G
Guest
Hello,
I've got a bit of an Excel programming problem. I really need to avoid
having the worksheet recalculate until the macro I'm running is done. To do
so, I've been using the command:
Application.Calculation = xlCalculationManual
It has been working fine, too, until I added more calculated data (using a
UDF) to the worksheet. Now the function just does not work. Adding a watch to
Application.Calculation shows that the value does not change after it is
explicitly set to xlCalculationManual. And adding "Debug.Assert
Application.Calculation = xlCalculationManual" after setting the Calculation
mode always causes that line to trigger the debugger.
Does anyone have any idea what can be causing this?
Does Excel have any conditions that must be satisfied before the calculation
mode can be toggled?
Thanks,
David
I've got a bit of an Excel programming problem. I really need to avoid
having the worksheet recalculate until the macro I'm running is done. To do
so, I've been using the command:
Application.Calculation = xlCalculationManual
It has been working fine, too, until I added more calculated data (using a
UDF) to the worksheet. Now the function just does not work. Adding a watch to
Application.Calculation shows that the value does not change after it is
explicitly set to xlCalculationManual. And adding "Debug.Assert
Application.Calculation = xlCalculationManual" after setting the Calculation
mode always causes that line to trigger the debugger.
Does anyone have any idea what can be causing this?
Does Excel have any conditions that must be satisfied before the calculation
mode can be toggled?
Thanks,
David