Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Anand,
You've got your file filter property set baddly Try PPF = Application.GetSaveAsFilename("Ckdate.prn", "Formatted Text, *.prn") FileFormat:="Type description, extension" Dan E "Anand Attavane" wrote in message ... 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. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Your next problem will be with the file SaveAs command
Dim PPF as String Chdrive "C" Chdir "C:\My folder1\Mysubfolder" PPF = Application.GetSaveAsFilename( _ InitialFileName:="ckdate.prn", _ FileFilter:="Formatted Text (*.prn), *.prn") ActiveWorkbook.SaveAs _ FileName:=ppf, _ FileFormat:=xlTextPrinter -- Regards, Tom Ogilvy Dan E wrote in message ... Anand, You've got your file filter property set baddly Try PPF = Application.GetSaveAsFilename("Ckdate.prn", "Formatted Text, *.prn") FileFormat:="Type description, extension" Dan E "Anand Attavane" wrote in message ... 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help with getsaveasfilename | Excel Discussion (Misc queries) | |||
GetSaveAsFilename not working in Excel 2003 | Excel Discussion (Misc queries) | |||
GetSaveAsFilename method | Excel Programming | |||
GetSaveAsFileName Not Working | Excel Programming | |||
Excel 2002 GetSaveAsFileName | Excel Programming |