H
Horatio J. Bilge, Jr.
I have noticed a problem with the SaveAs method I am using. Here is the code:
Dim fSaveName as Variant
Do
fSaveName = Application.GetSaveAsFilename
Loop Until fSaveName <> False
ThisWorkbook.SaveAs fSaveName
If the file name/location I choose in the GetSaveAsFilename dialog already
exists, I am asked if I want to replace it.
Clicking Yes replaces the file as expected, but clicking No or Cancel leads
to an error: "Method 'SaveAs' of object '_Workbook' failed"
Is there a way to handle this situation?
Dim fSaveName as Variant
Do
fSaveName = Application.GetSaveAsFilename
Loop Until fSaveName <> False
ThisWorkbook.SaveAs fSaveName
If the file name/location I choose in the GetSaveAsFilename dialog already
exists, I am asked if I want to replace it.
Clicking Yes replaces the file as expected, but clicking No or Cancel leads
to an error: "Method 'SaveAs' of object '_Workbook' failed"
Is there a way to handle this situation?