Application.CalculateFull

K

kathy.aubin

Hi,

I want to use Application.CalculateFull to calculate all the formula on
my spreadsheet. I have some data pulling from Bloomberg so it may takes
some time for the calculations to be completed. Is there a way to know
when the calculations are done? Cause once they are, I want to delete
the row where the data was not pulled from Bloomberg and have #N/A in
the cell.

Thank you,

Kathy
 
K

kathy.aubin

Great! So I can do :

If Application.CalculationState = xlDone then
..........

but then, what can I do when the State is not xlDone? I don't want the
macro to continue running until it's done. Is there a way yo do that?

Thanks
 
C

Charles Williams

If you use application.calculatefull then the next line in your VBA will not
execute until application.calculatefull has finished, so usually you dont
need to check Calculationstate.

If you do need to check it then do something like this
'
' calculation calls here
'
Do
'
' wait 2 seconds
'
Application.Wait(Now + TimeValue("0:00:02"))
If Application.CalculationState = xlDone then exit do
Loop


Charles
______________________
Decision Models
FastExcel 2.3 now available
Name Manager 4.0 now available
www.DecisionModels.com
 

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

Top