H
h2fcell
Hello,
I’m trying to create a macro that opens the file save as window with a
prefilled fill name and file format and allows me to save the file when I
click on the save button in the save as window.
The save as window opens, but when I click save the window closes and the
file is not saved.
Below is the code. Any suggestions are greatly appreciated.
Private Sub CommandButton2_Click()
Dim fileSaveName As String
fileSaveName = Application.GetSaveAsFilename( _
InitialFileName:=Range("B1").Value, _
FileFilter:="Excel Macro-Enabled Workbook (*.xlsm), *.xlsm")
End Sub
I’m trying to create a macro that opens the file save as window with a
prefilled fill name and file format and allows me to save the file when I
click on the save button in the save as window.
The save as window opens, but when I click save the window closes and the
file is not saved.
Below is the code. Any suggestions are greatly appreciated.
Private Sub CommandButton2_Click()
Dim fileSaveName As String
fileSaveName = Application.GetSaveAsFilename( _
InitialFileName:=Range("B1").Value, _
FileFilter:="Excel Macro-Enabled Workbook (*.xlsm), *.xlsm")
End Sub