I have VBA code to run a particular code and I am trying to pause the next execution by giving it a wait time of 3 seconds using the following line:
Applicat
This works for me:
Set wsh = VBA.CreateObject("WScript.Shell")
Dim waitOnReturn As Boolean: waitOnReturn = True
Dim windowStyle As Integer: windowStyle = 0
Dim errorCode As Integer
errorCode = wsh.Run("timeout 5", windowStyle, waitOnReturn)
this code allows to run cmd command and wait until execution is finished, in this particular case I am running command "timeout 5" which simly wait 5 seconds. I've found documentation here