Helpp! possessed macro!
Posted by RoB on November 21, 2001 12:12 PM
Ok, i have a problem on my hands. I have an excel template with an auto shutdown after 15 minutes code in it. The code works fine. Recently, with the help of people on this board, i made a filesearch with an excel workbook. the file search is meant to find files, all of which use the above mentioned template.
Now, whats happening is, after a search is done, and a file is opened using the above template, then closed, about 15 minutes later, the file that was opened magically opens, saves, and closes again. This is begining to become a problem if for instance you have something open and are typing. Now, im not POSITIVE that its the shutdown part of the macro, but im 99% sure because of the timing. FYI, the search is being left open while files are opened and closed. Is the timer in the shutdown code maybe not stopping when the file is closed and continuing because the search is open?? PLEASE HELp! here is the shutdown code that is in each template (its NOT in the search code):
Dim DownTime As Date
DownTime = Now + TimeValue("00:15:00")
Application.OnTime DownTime, "ShutDown"
On Error Resume Next
Application.OnTime EarliestTime:=DownTime, Procedure:="ShutDown", Schedule:=False
Any help is appreciated!