Serving the Quantitative Finance Community

 
User avatar
godfather
Topic Author
Posts: 0
Joined: July 16th, 2003, 11:32 am

process attached to file?

August 18th, 2003, 4:00 pm

i have a macro in a file dirtysheet.xls which basically goes like:Sub do_something() ..... Application.OnTime #10:00:00 PM#, "do_something"End Subwhat happens if for some reason I (have to) close dirtysheet.xls and open it again? is the call for do_something still in the memory or has it been killed? ie. do I need to restart do_something() such that the loop get's started?thanks for your comments!
 
User avatar
DavidJN
Posts: 269
Joined: July 14th, 2002, 3:00 am

process attached to file?

August 18th, 2003, 4:54 pm

In general, when you close your worksheet your macro will no longer be in memory. To get around this, you can make the macro an automatic macro, that is, one which automatically loads when you open the spreadsheet. Check Excel help for details.
 
User avatar
luizvs
Posts: 0
Joined: May 23rd, 2003, 6:13 pm

process attached to file?

August 19th, 2003, 2:37 pm

Hi Godfather,When you use Application. OnTime, the procedure you call at that time still remains even if you close your worksheet! It’s an application event and not a worksheet event!To avoid calling a macro after closing a worksheet, you have to cancel OnTime events!!You have to use something like…Application.OnTime EarliestTime:=TimeValue("event_time"), Procedure:="my_Procedure", Schedule:=FalseYou can do it before closing a worksheet!HTH
 
User avatar
Sofiane
Posts: 1
Joined: July 2nd, 2002, 9:39 am

process attached to file?

August 20th, 2003, 12:04 pm

Hi guys,did anyone of you has used GMM in eviews, I woul dhave a small question. Thanks !