Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following code:
FName = Application.GetSaveAsFilename(InitFileName, "Excel File (*.xls),*.xls") ActiveWorkbook.SaveAs FName, CreateBackup = False When I cancel the save, I get a "FALSE" file. I believe this is a backup file so I set Createbackup = false. But no luck. Thanks in advance. -- Thanks! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you cancel Application.GetSaveAsFilename the it returns "FALSE". You need
to check for this before saving FName = Application.GetSaveAsFilename(InitFileName, "Excel File (*.xls),*.xls") if FName < "FALSE then ActiveWorkbook.SaveAs FName, CreateBackup = False end if -- HTH... Jim Thomlinson "Daviv" wrote: I have the following code: FName = Application.GetSaveAsFilename(InitFileName, "Excel File (*.xls),*.xls") ActiveWorkbook.SaveAs FName, CreateBackup = False When I cancel the save, I get a "FALSE" file. I believe this is a backup file so I set Createbackup = false. But no luck. Thanks in advance. -- Thanks! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Declare FName as a Variant and test it for False (not "False"). E.g.,
Dim FName As Variant FName = Application.GetSaveAsFilename(....) If FName = False Then Debug.Print "User Cancelled" Else Debug.Print "Filename: " & FName End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (email address is on the web site) "Daviv" wrote in message ... I have the following code: FName = Application.GetSaveAsFilename(InitFileName, "Excel File (*.xls),*.xls") ActiveWorkbook.SaveAs FName, CreateBackup = False When I cancel the save, I get a "FALSE" file. I believe this is a backup file so I set Createbackup = false. But no luck. Thanks in advance. -- Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
SaveAs - VBA | Excel Discussion (Misc queries) | |||
SaveAs - VBA | Excel Discussion (Misc queries) | |||
VBA SaveAs Value | Excel Discussion (Misc queries) | |||
SaveAs | Excel Programming | |||
SaveAs | Excel Programming |