PDA

View Full Version : pause and continue



asdzxc
05-31-2012, 04:34 AM
macro to continue after 5 min or I hit Enter key
plse add code
' Waits 5 min
Application.Wait Time + TimeSerial(0, 5, 0)
' Continues here after pause

GTO
05-31-2012, 05:15 AM
Option Explicit

Sub macroWait()
MsgBox "Wait"
Application.Wait Now + TimeValue("00:00:05")
MsgBox "Go"
End Sub

asdzxc
05-31-2012, 05:27 AM
Thank you for your code.
my vba is:
a
b
c
d
if I want to wait after b and continue after c, what code to add between b and c,plse?

Bob Phillips
05-31-2012, 05:38 AM
a
b
Call MacroWait
c
d

asdzxc
05-31-2012, 06:33 AM
Thank you for your help.

racksjackson
05-31-2012, 10:22 AM
In your question I am not getting you want position of call or saying a,b,c character checking so I am replying both.
first: when we have to call any code according to our desire we could type our code in procedure and call it wherever we want to call.

second: you could check ASCII value of a b c characters and call your procedure.

I hope you would get your answer.