Seems like it should be simple to do, but I've been searching and can't find the answer.
I have a workbook in which the Aut
pen code checks to see if the current computer date is after a date I've defined as a variable.
If this condition is true, I want the workbook to close immediately--do not pass go, nothing else. Just display my message box saying that "Your time is up" and shut Excel down after the user clicks OK.
Application.Quit does quit Excel, but it also allows execution of the full Auto_Close code. This I DON'T want it to do. There are a lot of saving, backing up, and maintenance tasks in the Auto_Close code that are unnecessary if the file is too old, it should just quit without fanfare.
How do I shut Excel down programmatically and skip the Auto_Close macro code?
I have a workbook in which the Aut
If this condition is true, I want the workbook to close immediately--do not pass go, nothing else. Just display my message box saying that "Your time is up" and shut Excel down after the user clicks OK.
Application.Quit does quit Excel, but it also allows execution of the full Auto_Close code. This I DON'T want it to do. There are a lot of saving, backing up, and maintenance tasks in the Auto_Close code that are unnecessary if the file is too old, it should just quit without fanfare.
How do I shut Excel down programmatically and skip the Auto_Close macro code?