ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help with GetSaveAsFilename (https://www.excelbanter.com/excel-programming/356957-help-getsaveasfilename.html)

aj

Help with GetSaveAsFilename
 
I get an error message when I run this Code.
Runtime error "13" type mismatch.
Then it highlights
fName = Application.GetSaveAsFilename()

Here is the Code

Private Sub CommandButton1_Click()
Dim fName As Boolean
fName = Application.GetSaveAsFilename()
If fName < False Then
ActiveWorkbook.SaveAs Filename:=fName
Else
MsgBox "You hit cancel"
End If

End Sub



All times are GMT +1. The time now is 04:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com