REAL-TIME

VBA Projects

Full Access with Source Code
  • Designed and Developed by PNRao

  • Full Access with VBA Source Code

  • Well Commented Codes Lines

  • Creative and Professional Design

Effortlessly
Manage Your Projects

120+ Project Management Templates

Seamlessly manage your projects with our powerful & multi-purpose templates for project management.

120+ PM Templates Includes:
  • 50+ Excel Templates

  • 50+ PowerPoint Templates

  • 25+ Word Templates

Share Post

Wait Application Method in VBA is used to pauses or stop a running macro until a specified or mentioned time. It returns a Boolean value either true or false. If the specified time arrived, it returns true otherwise it returns False.

VBA Wait Application Method Excel Object

VBA Wait Application Method – Syntax

Here syntax for Wait method of application object in VBA.

Application.Wait(Time)

Where
Time: It is a required parameter. It specifies the time at what time you want to resume the macro.
In the above syntax Application represents object and Wait is the method of Application of Application object.

VBA Wait Application Method: Example 1

Please find the below example for Wait method of application object in excel VBA.
Application. The below macro Pauses an application till 4.00 PM today.

Sub Appl_Wait1()
    Application.Wait "16:00:00"
End Sub

VBA Wait Application Method: Example 2

Please find the below example for Wait method of application object in excel VBA.
Application. The below macro Pauses an application for 20 seconds from now.

Sub Appl_Wait2()
    Application.Wait Now + TimeValue("00:00:20")
End Sub

VBA Wait Application Method: Example 3

Please find the below example for Wait method of application object in excel VBA.
‘Display message after 60 seconds.The below macro displays a message like “Your session has expired”
after 60 seconds or 1 hour.

Sub Appl_Wait3()
    If Application.Wait(Now + TimeValue("0:00:60")) Then
        MsgBox "Your session has expired"
    End If
End Sub

VBA Wait Application Method – Instructions

Please follow the below steps to execute the VBA code to save the excel file.
Step 1: Open any existing Excel Application.
Step 2: Press Alt+F11 – This will open the VBA Editor.
Step 3: Insert a code module from then insert menu.
Step 4: Copy the above code and paste in the code module which have inserted in the above step.
Step 5: Now press F5 to execute the code.
Step 6: First time run the macro in debug mode (Press F8) to observe the Wait macro result.

Effortlessly Manage Your Projects and Resources
120+ Professional Project Management Templates!

A Powerful & Multi-purpose Templates for project management. Now seamlessly manage your projects, tasks, meetings, presentations, teams, customers, stakeholders and time. This page describes all the amazing new features and options that come with our premium templates.

Save Up to 85% LIMITED TIME OFFER
Project Management Templates

All-in-One Pack
120+ Project Management Templates

Essential Pack
50+ PM Templates

Excel Pack
50+ Excel PM Templates

PowerPoint Pack
50+ Excel PM Templates

MS Word Pack
25+ Word PM Templates

Ultimate Project
Management Template
Ultimate Resource
Management Template
Project Portfolio
Management Templates
Last Updated: March 2, 2023

2 Comments

  1. taboeric November 13, 2017 at 10:30 AM

    Hello, I have a question and would like your comment. Excel has a bug of memory leakage in OLEDB and the solution is to restart Excel. I have successfully written a VBA scrip to kill the EXCEL32 process, then open the workbook and run the macro. Is there anyway to use application.wait or other commands to delay the opening and running the macro after the completion of killing of process.

  2. M Pravin Kumar October 3, 2020 at 10:34 AM

    Wait stops the program execution. Is there any other method by which Wait can run in background and execute something after the time is elapsed while program execution goes uninterrupted?

Leave A Comment