Hello
My button is to open the SaveAs dialog box so the user can pick the path for the worksheet.
II would like the file name and file type pre-filled in on the SaveAs dialog box
here is my 'not working' code
This code launches the Save dialog box but doesn't fill in the 'Save As' or 'File Format' boxes
If I click the 'Save' button on the dialog box it saves a file with the correct name but no .xlsm extension making the file unusable unless you manually add the extension.
Anyone see the issue?
Thanx
Tom
My button is to open the SaveAs dialog box so the user can pick the path for the worksheet.
II would like the file name and file type pre-filled in on the SaveAs dialog box
here is my 'not working' code
Rich (BB code):
Sub Button72_Click()
Dim fname As String
fname = Range("g9") & Range("h9")
Application.GetSaveAsFilename , (fname)
ThisWorkbook.SaveAs FileName:=fname, FileFormat:=52
End Sub
This code launches the Save dialog box but doesn't fill in the 'Save As' or 'File Format' boxes
If I click the 'Save' button on the dialog box it saves a file with the correct name but no .xlsm extension making the file unusable unless you manually add the extension.
Anyone see the issue?
Thanx
Tom