Close Open Workbook
Well, YOUR workbook must be open. In its open event:
Application.OnTime timevalue("01:00:00 AM"),"MyMacro"
Then, in a regular module, have your MyMacro close all open workbooks.
"Lucy" wrote in message
...
This is my third posting of the same question in the past
couple weeks with no solution in sight. I am getting
little cranky with all the help for everything else, but
what I need. Here is the problem:
I need to be able to close any open Excel file before I
start an upload. These files are located on a mainframe
and people all over the place leave the apps open when
they go home, thus preventing me from doing my upload. I
do know the code how the close the workbooks, so please
do not offer it.
All I need is the code to trigger it. Therefore if the
file stays open past specific time (e.g. 1 AM) this event
will come into play and close the app (similar to On
Timer event in Access).
In laymen terms: If the time is 1:00 AM and the workbook
is still open, QUIT IT (all without any user
interaction). Like a timer on your TV.
Does anybody (including the Excel MVP's) know a code how
to trigger this when all the users left the office with
the workbooks open?
Thank you.
Lucy
|