Pausing Excel

From time to time i like to make Excel pause. A typical example is when a process has finished and I'm about to hide a userform. I may need/want to give some info to the user, for which i need to display the form for a little longer. a simple one line can do the trick.

VBA:
  1. Application.Wait Now + TimeValue("0:00:01")

The lenght of time is controlled by the last part, which is hours, mins, seconds,

You can also use the Application wait to run code at a defined time this would run 5.30 pm

VBA:
  1. Application.Wait "17:30:00"<code>

Bon.

Related posts:

  1. Development time and value to business.
  2. Excel and Windows Dialogs
  3. Using the immediate window from within the Excel desktop

Submit a Comment