View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz[_2_] JLGWhiz[_2_] is offline
external usenet poster
 
Posts: 1,565
Default Pause in a macro

This will give you a 90 second pause in the macro while allowing all other
events to continue.

s = Timer + 90
Do While Timer < s
DoEvents
Loop



"Darren" wrote in message
...
I have a series of sheets that uses a button on sheet 1 to refresh all the
data in the other sheets. I then press another button, again on sheet 1 do
the preset calculations to each sheet using a self written macro. What I
want
to know is, is it possible to write a pause into a macro that will last
long
enough for all the refreshing to finish before the calculations start? The
refresh usually takes about 90 seconds but this is variable according to
connection speed and time of day, etc...