Calculation state

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to recalculate a worksheet many times using VBA to record the input &
output values from the model in the worksheet. I need to detect when a
recalculation is finished before initiating the next one. I tried using
If Application.CalculationState = 2 Then ... and
If Application.CalculationState = xlDone Then...
without success. Does anyone have a suggestion for this problem.
 
I believe that Application.Calculate waits until the recalculation is
complete before passing control back to the next line of code in a VBA
routine. Call it right after you are finished putting all of the inputs in
their cells. Capture and store all input and output values (copy and
paste-special-cells) to a separate log worksheet before beginning the next
iteration.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top