I have the following code to select a save location for a workbook:
If the user hits the cancel button, how do I detect this and exit out of the macro? Right after that I have the code that closes the workbook and I'd like to exit out if the user hits cancel.
Thanks in advance for your help!
Onwards,
Q-
Code:
Application.Dialogs.Item(xlDialogSaveAs).Show arg1:="sheet1", arg2:=xlCSV
ActiveWorkbook.Saved = True
ActiveWindow.Close
If the user hits the cancel button, how do I detect this and exit out of the macro? Right after that I have the code that closes the workbook and I'd like to exit out if the user hits cancel.
Thanks in advance for your help!
Onwards,
Q-