View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
aj aj is offline
external usenet poster
 
Posts: 7
Default 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