+ Reply to Thread
Results 1 to 3 of 3

Pausing procedure until worksheet finishes calculating

  1. #1
    Guest

    Pausing procedure until worksheet finishes calculating

    I am writing a macro for a workbook that has
    a "Calculation" worksheet. There is a Loop procedure that
    passes numbers through this "Calculation" worksheet and
    each time, the output is copied to a different worksheet.
    It looks like the copy part is happening before
    the "Calculation" worksheet can finish calculating. Is
    there a way to pause the procedure until the worksheet is
    done calculating?

    Thanks.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hi,

    If your copies are correct, turn off screen updating while the macro is running:

    Application.ScreenUpdating = False

    and re-enable it after the macro has finished:

    Application.ScreenUpdating = True


    If you do need to pause while the worksheet calculates, create a user form that displays a message like "Please wait while the worksheet calculates." Have the macro run when you call the form. After the macro finishes, close the form. You can call the form and have it execute from in the loop.

    Hope this helps,
    Leith Ross
    Last edited by Leith Ross; 02-18-2005 at 04:32 PM.

  3. #3
    Don Guillett
    Guest

    Re: Pausing procedure until worksheet finishes calculating

    application.enableevents=false
    your code
    reset to true

    --
    Don Guillett
    SalesAid Software
    donaldb@281.com
    <anonymous@discussions.microsoft.com> wrote in message
    news:004e01c515f4$16144d80$a401280a@phx.gbl...
    > I am writing a macro for a workbook that has
    > a "Calculation" worksheet. There is a Loop procedure that
    > passes numbers through this "Calculation" worksheet and
    > each time, the output is copied to a different worksheet.
    > It looks like the copy part is happening before
    > the "Calculation" worksheet can finish calculating. Is
    > there a way to pause the procedure until the worksheet is
    > done calculating?
    >
    > 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