VBA to Pause or Wait 10 seconds before continuing code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Please would someone help me with a line of code to pause or wait 10 seconds
before continuing with the remaining code.

I have tried large For...Next loops but these seem to execute too quickly!

Thanks

Ian
 
You will need to call the timer function for this.


Private Sub (KillSomeTime)

Dim PauseTime, Start
PauseTime = 10 ' Set duration in seconds
Start = Timer ' Set start time.
Do While Timer < Start + PauseTime
DoEvents ' Yield to other processes.
Loop

End Sub

Austin Myers
MS PowerPoint MVP Team

Provider of PFCPro, PFCMedia and PFCExpress
www.playsforcertain.com
 
Back
Top