Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I run a function periodically in a visual basic form

Status
Not open for further replies.

ii128

Programmer
Joined
May 18, 2001
Messages
129
Location
US

How can I run a function periodically in a visual basic form without open and run the form?
 
Sub DoSomethingWhenToldTo()
Application.OnTime earliesttime:=TimeValue("23:58:00"), procedure:="macronamegoeshere"
End Sub


then possibly in your macro turn off events?

Application.EnableEvents=False

I never tried it.
 
You can use a Timer Object. Put it on your form and treat the timer event.

s-) Blessed is he who in the name of justice and good will, shepards the week through the valley of darknees...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top