How to add delay of 5 seconds using vba?
Report abuse
Thank you.
Reported content has been submitted
Report abuse
Thank you.
Reported content has been submitted
2 people found this reply helpful
·Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Option Explicit
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Sub Doze(ByVal lngPeriod As Long)
DoEvents
Sleep lngPeriod
' Call it in desired location to sleep for 1 seconds like this:
' Doze 1000
End Sub
Sub Demo()
MsgBox "1"
Doze 3000
MsgBox "2"
End Sub
***
Death smiles at us all, but all a man can do is smile back.
For more help with Word visit:
http://gregmaxey.com/word_tips.html
Report abuse
Thank you.
Reported content has been submitted
5 people found this reply helpful
·Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Question Info
Last updated March 30, 2025 Views 17,997 Applies to:
