Thread: Pause a Macro
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default Pause a Macro

Put this function at the top of your code module.

Public Function OneSecDly()
s = Timer + 1
Do While Timer < s
DoEvents
Loop
End Function

Then to execute the delay, simply type "OneSecDelay" (without the quote
marks) on a line where you want the delay to occur.

"JeffR" wrote:

Is there a way to pause a looping macro, such as 1 second at the bottom of
each loop?