I am trying to do some validation on the file name before it's saved.
Here are my three file-saving scenarios:
- File > Save
- File > Save As > Browse > Save
- File > Save As > Save
Additional Info:
As defined in the Workbook_BeforeSave event, the SaveAsUI parameter will indicate whether or not a dialog box is needed to save changes.
✓ In scenario 1, SaveAsUI=False, so I get the filename from ThisWorkbook.Name
✓ In scenario 2, SaveAsUI=True, so I force a dialog and get the file name with the GetSaveAsFilename method
✗ In scenario 3, SaveAsUI=True, but no intermediary dialog is ever actually required! The file gets immediately saved to that name entered in the input box.
...it's ridiculous that I'm obsessing over this because I can just override scenario 3 and force a dialog anyways, but I'm curious. Any ideas?