+ Reply to Thread
Results 1 to 5 of 5

Calculations And Order In Macros

  1. #1
    Carl Bowman
    Guest

    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. #2
    Otto Moehrbach
    Guest

    Re: Calculations And Order In Macros

    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" <[email protected]> wrote in message
    news:[email protected]...
    >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. #3
    Carl Bowman
    Guest

    Re: Calculations And Order In Macros

    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" <[email protected]> wrote in message
    > news:[email protected]...
    > >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. #4
    Otto Moehrbach
    Guest

    Re: Calculations And Order In Macros

    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" <[email protected]> wrote in message
    news:[email protected]...
    >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. #5
    Carl Bowman
    Guest

    RE: Calculations And Order In Macros

    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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1