Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default Pause in a macro

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...
  #2   Report Post  
Posted to microsoft.public.excel.programming
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...



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default Pause in a macro

This is my macro:
Application.Run "Monthly_Reset_A_C"
Application.Run "Monthly_Reset_D_M"
Application.Run "Monthly_Reset_N_Z"

I want to insert: Application.Run "Refresh" to refresh all the sheets before
they get reset for the monthly figure. Doing what you explained only puts a
90 second pause before it runs the monthly reset applications, which still
run before the refresh. Where do I put your snippet to make it run in the
correct order?

"JLGWhiz" wrote:

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...




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pause a Macro JeffR Excel Programming 6 October 9th 08 10:53 AM
Stop / Pause a Macro using Pause button scott56hannah Excel Programming 0 June 27th 08 12:48 PM
pause macro Art Parra Excel Programming 1 August 29th 06 12:16 AM
Pause a Macro? Jimbo Excel Programming 2 October 14th 04 04:21 AM
Pause macro Bill Barclift Excel Programming 0 September 30th 03 09:22 PM


All times are GMT +1. The time now is 05:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"