Calculation in Macros

brettvba

MrExcel MVP
Joined
Feb 18, 2002
Messages
1,030
Does anyone know how to make the macro wait till the calculation is finished?

Brett
 

Some videos you may like

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

DonkeyOte

MrExcel MVP
Joined
Sep 6, 2002
Messages
9,123
there is something called "wait" I think but can't remember the exact code...anyone?
 

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
As far as I know the Calculate method pauses Excel until calculation is complete.

Is calculation set to automatic? If so:

Code:
Application.Calculation = xlManual
' *** Your code goes here ***
Application.Calculation = xlAutomatic
 

brettvba

MrExcel MVP
Joined
Feb 18, 2002
Messages
1,030
Thanks Guys, I was actually wanting to make sure all the calculations on the sheet were done before I .value the formulas,
I have tried application.calulate that seems to work but takes a very long time,

Brett
 

Watch MrExcel Video

Forum statistics

Threads
1,118,081
Messages
5,570,088
Members
412,310
Latest member
mark884
Top