Change Save as Default type with VBA in Excel
How to change the default Save as type using VBA in Excel. Allow files to be saved as Macro enabled files.
For more help visit my website or email me at easyexcelanswers@gmail.com
I am able to provide online help on your computer for a reasonable rate.
MY videos are all created on Camtasia.
Follow me on Facebook
Sub changesavas()
Dim FileSaveAsName As Variant
Dim intchoice As Integer
Static saveProcess As Boolean
Application.EnableEvents = False
ActiveWindow.ScrollRow = 1
Set FileSaveName = Application.FileDialog(msoFileDialogSaveAs)
FileSaveName.InitialFileName = ThisWorkbook.Name
FileSaveName.FilterIndex = 2 ‘select to save with a “.xlsm” extension
intchoice = FileSaveName.Show
If intchoice (symbol for not equal to) 0 Then
FileSaveName.Execute
End If
Application.EnableEvents = True
End Sub
Watch more new videos about Excel Office | Synthesized by Mindovermetal English
Hi Barb
I use the really good vba code to save my file with. I have a question, is it possible to put the file name into a cell and make it appear in the dialog box.
Many greetings Klaus W
so good to actually find this..
Thank you so much, made my job easier.