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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you do a DoEvent syntax 1

Status
Not open for further replies.

Rousseau10

Programmer
Joined
Feb 22, 2005
Messages
242
Location
US
I am trying the DoEvent.wait ... to pause my over eager program, but I do not know the sysntax - intellisense does not come up on '
DoEvent.
or
DoEvents.

Do I need make reference to the DoEvent like other class obects?
 
There's no DoEvents.Wait

DoEvents is issued as a single statement after a statement where you need to yield to the OS. For instance in a heavy processing you'd like to update a statusbar, form...

[tt]me!txtSomeText.value = "Duh - still working, hang in there..."
DoEvents[/tt]

Hint - press F1 while the cursor is whithin DoEvents

Roy-Vidar
 
If you want it to wait a little bit with the doevents try this. Roy has the right syntax, but it will just blow right by it without waiting depending on what your over eager program is having a problem with

THis will pause it for 5 seconds.
PauseTime = 5 ' Set duration.
Start = Timer ' Set start time.
Do While Timer < Start + PauseTime
DoEvents ' Yield to other processes.
Loop

matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top