99.4% Of all customers recommend us, we're so confident about our results we publish all reviews and statsView Live Stats View Reviews
Using the Excel VBA Wait command
The Excel VBA Wait command is an instruction that can be used to delay the running of a macro.
The command is written as:
e.g. This example pauses a running macro until 6:23 P.M. today.
This example displays a message indicating whether 10 seconds have passed.
If Application.Wait(Now + TimeValue("0:00:10")) Then
MsgBox "Time expired"
It can be used in a HR or Financial function to have a front splash screen(logo) and after a delay, the main form appears.
After running a routine, you may want a message box to appear outlining the next instruction.
Related forum posts:
I understand the command - [b]Application.Wait Now + TimeValue("00:00:01")[/b] is to pause the macro for 1 second before execution. But it only pauses at the beginning of the macro and not within. How do I manipulate the line so it will pause in the middle of my macro. e.g. My Excel macro suppose to wait for the user to choose paper tray before printing. My code so far pauses for 5 seconds at the beginning before it executes... '''''''''''''''''''''''''''''''''
Welcome. Please choose your application (eg. Excel) and then post your question.
Our Microsoft Qualified trainers will then respond within 24 hours (working days).
Any suggestions, questions or comments? Please post in the Improve the forum thread.