D
debartsa
Hi Everybody,
I have a "CommandButton" on a Worksheet which implements the the "Save" and
"SaveAs" features normally found in the "File" menu. The click event
implements logic which decides whether to execute the "ActiveWorkbook.Save"
or the "ActiveWorkbook.SaveAs (FileName)" command.
My problem is when the .SaveAs command is executed and an existing file
exists with the same file name is in the target directory, the user gets a
message box asking whether the existing file should be overwritten. This
message box is a feature of Excel and Windows itself i.e. I'm not
implementing custom code for this feature to happen. If the user selects the
"Cancel" button I need to make sure my code for "ActiveWorkbook.SaveAs
(FileName)" isn't executed.
Is there a way to pick-up whether the user selects "Cancel"?
Thanks for any help!
Sam
P.S. I'm using Excel 97.
I have a "CommandButton" on a Worksheet which implements the the "Save" and
"SaveAs" features normally found in the "File" menu. The click event
implements logic which decides whether to execute the "ActiveWorkbook.Save"
or the "ActiveWorkbook.SaveAs (FileName)" command.
My problem is when the .SaveAs command is executed and an existing file
exists with the same file name is in the target directory, the user gets a
message box asking whether the existing file should be overwritten. This
message box is a feature of Excel and Windows itself i.e. I'm not
implementing custom code for this feature to happen. If the user selects the
"Cancel" button I need to make sure my code for "ActiveWorkbook.SaveAs
(FileName)" isn't executed.
Is there a way to pick-up whether the user selects "Cancel"?
Thanks for any help!
Sam
P.S. I'm using Excel 97.