View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Robert Crandal[_3_] Robert Crandal[_3_] is offline
external usenet poster
 
Posts: 161
Default Question about ActiveWorkbook.SaveAs()

Here is a basic sample of my code:

For j = 1 to 3

ActiveWorkbook.SaveAs Filename:="myfile.xlsm", _
FileFormat:=xlOpenXMLWorkbookMacroEnabled, _
CreateBackup:=False

Next ' j

If the SaveAs filename already exists, the user will be
prompted with a dialog box that says:
"A file named 'myfile.xlsm' already exists in this location.
Do you want to replace it?"

Is there a way to determine whether the user selected
"Yes" or "No" to replace the file?