What do I need to do if I want to run a macro 10 seconds after I open a form. I tried the Timer Interval but it keeps running the macro every 10 seconds.
The trick is to let the timer event run once; then set the timer interval to 0; ie:
(a) Ensure that the timer interval property is set to 10000 milliseconds in the design view of the form
(b) At the end of the timer event code, set the timerinterval property to zero. This will prevent the interval from 'firing' again once it has run the first time.
For example:
Private Sub Form_Timer()
'-------------------
'Your code goes here
'-------------------
MsgBox "Put timer event code here"
' ...
' ...
'----------------------------
'prevent code from re-running
'----------------------------
Me.TimerInterval = 0
End Sub
Cheers,
Steve Lewy
Solutions Developer
steve@lewycomputing.com.au
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.