PDA

View Full Version : disable OnTime macro before close file



omp001
12-17-2011, 01:02 PM
Hi all.
I have a command in the WbOpen event like this:
Application.OnTime TimeValue ("06:01:00"), "MyMacro" It's working.

What I need is to disable this command before close the file in order to prevent the file to reopen automatically to run "MyMacro".
I've tried
Application.OnTime, "MyMacro", , false but this not work, the event BeforeClose crashes.
thanks in advance

mikerickson
12-17-2011, 01:06 PM
When un-OnTiming, the time that the routine is set to run must be specified.

omp001
12-17-2011, 01:47 PM
Yes, Mike. Worked. Like this
Application.OnTime TimeValue ("06:01:00"), "MyMacro" , , False
thank you