Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Carl Bowman
 
Posts: n/a
Default Calculations And Order In Macros

I have a macro that prints a message to the user, then calculates hundreds of
links (several minutes), then needs to clear the message. The macro is
basically, "print message, calculate, clear message". Will Excel wait until
it finishes updating the links before going to the next step in the macro to
clear the message? I cannot use the "wait" or "OnTime" command because there
is no way to predict how long the calculation will take.
Thanks.
  #2   Report Post  
Otto Moehrbach
 
Posts: n/a
Default

You say "print the message" and you say "clear the message". Do you have a
message that is being sent to the printer or do you have a message box pop
up on the screen? If you have a message box (using the MsgBox command) pop
up on the screen, all code execution will stop until you click the OK button
in that message box. IOW, the code to "calculate" will not run until the
message box has been manually cleared. Does this help? Otto
"Carl Bowman" wrote in message
...
I have a macro that prints a message to the user, then calculates hundreds
of
links (several minutes), then needs to clear the message. The macro is
basically, "print message, calculate, clear message". Will Excel wait
until
it finishes updating the links before going to the next step in the macro
to
clear the message? I cannot use the "wait" or "OnTime" command because
there
is no way to predict how long the calculation will take.
Thanks.



  #3   Report Post  
Carl Bowman
 
Posts: n/a
Default

Thanks but your answer did not answer the question because I failed to give
you enough information. I am inserting a message to the user in one of the
cells, then recalculating the workbook, then clearing the message by clearing
the cell.
Thanks again.

"Otto Moehrbach" wrote:

You say "print the message" and you say "clear the message". Do you have a
message that is being sent to the printer or do you have a message box pop
up on the screen? If you have a message box (using the MsgBox command) pop
up on the screen, all code execution will stop until you click the OK button
in that message box. IOW, the code to "calculate" will not run until the
message box has been manually cleared. Does this help? Otto
"Carl Bowman" wrote in message
...
I have a macro that prints a message to the user, then calculates hundreds
of
links (several minutes), then needs to clear the message. The macro is
basically, "print message, calculate, clear message". Will Excel wait
until
it finishes updating the links before going to the next step in the macro
to
clear the message? I cannot use the "wait" or "OnTime" command because
there
is no way to predict how long the calculation will take.
Thanks.




  #4   Report Post  
Otto Moehrbach
 
Posts: n/a
Default

Carl
The code works in the sequence it is written. It executes one line of
code, then moves on to the next line, and so on. It doesn't skip lines or
jump around in the code unless the code is written specifically to do so.
HTH Otto
"Carl Bowman" wrote in message
...
I have a macro that prints a message to the user, then calculates hundreds
of
links (several minutes), then needs to clear the message. The macro is
basically, "print message, calculate, clear message". Will Excel wait
until
it finishes updating the links before going to the next step in the macro
to
clear the message? I cannot use the "wait" or "OnTime" command because
there
is no way to predict how long the calculation will take.
Thanks.



  #5   Report Post  
Carl Bowman
 
Posts: n/a
Default

Thanks for the help. That was what I needed to know.

"Carl Bowman" wrote:

I have a macro that prints a message to the user, then calculates hundreds of
links (several minutes), then needs to clear the message. The macro is
basically, "print message, calculate, clear message". Will Excel wait until
it finishes updating the links before going to the next step in the macro to
clear the message? I cannot use the "wait" or "OnTime" command because there
is no way to predict how long the calculation will take.
Thanks.

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



All times are GMT +1. The time now is 09:56 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"