Hi
I'm using Excel 2007 and Windows XP Pro...
I'm trying to get VB to wait for excel to calculate a sheet before carrying on with the rest of the macro.
The above seems to work but I don't want to calculate the entire workbook (which is what
does). I would prefer to use something like
instead.
But when I do that, the Application.CalculationState doesn't work i.e. Application.CalculationState is always not equal to xldone.
Can you help?
Thanks
I'm using Excel 2007 and Windows XP Pro...
I'm trying to get VB to wait for excel to calculate a sheet before carrying on with the rest of the macro.
Code:
Application.Calculation = xlCalculationManual
Application.Calculate
While Application.CalculationState <> xlDone
'MsgBox Application.CalculationState
DoEvents
Wend
The above seems to work but I don't want to calculate the entire workbook (which is what
Code:
Application.Calculate
Code:
Sheets("Sheet1").Calculate
But when I do that, the Application.CalculationState doesn't work i.e. Application.CalculationState is always not equal to xldone.
Can you help?
Thanks