View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Anand Attavane Anand Attavane is offline
external usenet poster
 
Posts: 1
Default GetSaveAsFilename

I can't make this method work. I want to save the file as
formatted text file, i.e., .prn file. Here is my code:

Sub GetUserSaveFile()
Dim PPF As Variant
PPF = Application.GetSaveAsFilename("Ckdate.prn",
Filefilter:="*.prn")
ThisWorkbook.SaveAs Filename:=PPF
End Sub

I get application "Runtime Error 1004"
Method 'GetSaveAsFilename' of object "_Application' failed.

Thank you for your help.