Hi all,
I built a workbook that needs to be available to people throughout my office. Obviously, if someone opens it and just leaves it open all day, it becomes an issue for the other employees. In order to avoid this, I put in a shutdown timer macro that will save and close the workbook after 20 minutes.
I have a rather complex BeforeClose Event set up already. It asks if the user really wants to exit the workbook, then hides every sheet in the workbook except one, clears data from several tables, hides a bunch of form control buttons on the various worksheets that only the SuperAdmin is allowed to use (which only show up if you log in as a SuperAdmin upon opening the workbook), saves the workbook and then closes it.
Here's the problem: if someone times out in the workbook, I don't want that confirmation box to pop up, because then it will just keep sitting there and waiting for someone to do something to it and the workbook won't close, which defeats the whole point of a shutdown timer in the first place!
Is there a way to NOT fire the message box portion of the code if the user times out in the workbook? Everything else still needs to be done, but I don't want the message box to appear.
Here's the code for setting up the shutdown timer (it's in a module):
Here is the code for the BeforeClose procedure:
Any advice would be greatly appreciated. Thanks!
Bookmarks