+ Reply to Thread
Results 1 to 19 of 19

calculationstate

Hybrid View

  1. #1
    Kris
    Guest

    Re: calculationstate

    Charlie wrote:


    > Are saying you want all sheet calculations to complete first, then the
    > Worksheet_Change event to fire last? (But the calculations are firing it
    > prematurely?) Yea? Nay?


    Worksheet_change is fired by a user who changes something on a sheet.
    Because calculation is set to manual I must recalculate sheet.

    Calcualate can fire worksheet_change once again, but I exit it if target
    is out of specific region. It can happen when calcuate change something
    of that sheet. But it doesn't and I quit worksheet_change if this is out
    of region I am interested in.


    application.calculate doesn't wait.
    so the rest of code doesn't make sense, because data is not updateed on
    the rest of sheets.



    >
    > Or you may need to rewrite your logic to move or duplicate what it is you
    > are doing in the Worksheet_Change sub to your main code.


    The only thing which I can do is to remove the rest of code from
    worksheet_change, put it as a separate procedure and add button to
    worksheet. Now user can finish code manualy, but I don't want to do that.


  2. #2
    Charlie
    Guest

    Re: calculationstate

    It's like a circle: can't calculate without data, can't get data without
    calculating. Sounds like it's time to re-examine the logic flow and design a
    new method of solving the problem.

    "Kris" wrote:

    > Charlie wrote:
    >
    >
    > > Are saying you want all sheet calculations to complete first, then the
    > > Worksheet_Change event to fire last? (But the calculations are firing it
    > > prematurely?) Yea? Nay?

    >
    > Worksheet_change is fired by a user who changes something on a sheet.
    > Because calculation is set to manual I must recalculate sheet.
    >
    > Calcualate can fire worksheet_change once again, but I exit it if target
    > is out of specific region. It can happen when calcuate change something
    > of that sheet. But it doesn't and I quit worksheet_change if this is out
    > of region I am interested in.
    >
    >
    > application.calculate doesn't wait.
    > so the rest of code doesn't make sense, because data is not updateed on
    > the rest of sheets.
    >
    >
    >
    > >
    > > Or you may need to rewrite your logic to move or duplicate what it is you
    > > are doing in the Worksheet_Change sub to your main code.

    >
    > The only thing which I can do is to remove the rest of code from
    > worksheet_change, put it as a separate procedure and add button to
    > worksheet. Now user can finish code manualy, but I don't want to do that.
    >
    >


  3. #3
    Kris
    Guest

    Re: calculationstate

    Charlie wrote:
    > It's like a circle: can't calculate without data, can't get data without
    > calculating. Sounds like it's time to re-examine the logic flow and design a
    > new method of solving the problem.
    >

    It's not a circle. There is no loop there.
    Summary sheet collect data from other sheets and other sheet doesn't
    need any data from summary sheet to be calculated.


+ 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