Re: Timer

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Stephen Bullen (stephen_at_bmsltd.ie)
Date: 02/05/04


Date: Thu, 05 Feb 2004 20:47:05 GMT

Hi Phil,

> I have a timer which is calls a function after 5 seconds
> (using StartTimer and KillTimer). What I am trying to do
> once the timer is activated is to open another file (works
> OK) and then close the orginal file that contained the
> timer functions. The problem is that all of excel shuts
> down, including the newly opened spread***. The code for
> closing files works as I use it often. Also, the Auto_Open
> () fails to run when I open the second excel file.

Is there a reason you're using StartTimer and KillTimer (i.e. API-level
calls) instead of Application.OnTime (i.e. application-level calls)?

Regards

Stephen Bullen
Microsoft MVP - Excel
www.BMSLtd.co.uk


Quantcast