Explain about the WAIT method of Application Object

  • Wait method stops the execution of the program for defined time
  • It allows the application to wait for some time and reconcile the action of the macro with Code
  •  

     

    This WAIT method is userful in case of

  • Web Scrapping Process
  • Interacting with folders
  • Large Data Files
  •  

    Click on below mentioned image to watch the video:

     

    Download the Workbook

     

    Sub WaitMethodOfApplicationObject()
    Dim i As Integer
    For i = 1 To 5
    ActiveSheet.Cells(i, 1).Value = i
    Application.Wait (Now() + TimeValue("00:00:01"))
    Next
    End Sub