C
Conceptor
Hi,
I created a XLA addin that is already activated when
Excel XLS workbooks are opened. These XLS workbooks have
cell formulas that refer to a macro called Macro1 I put in
the XLA code. Problem: When a XLS workbook opens, Excel
automatically recalculates the workbook cell formulas that
use Macro1. I need to cancel this recalculation because
when loading, Workbooks don't have all the information
needed to evaluate the Macro1 return value.
I tried to cancel the calculation by using:
application.calculation = xlCalculationManual
in the Workbook_Open events (catched from the XLA). When
loading the XLS workbook, Excel crashes with the following
error message:
Execution error 1004: the 'calculation' method of
the 'application' object failed.
I never was able to find out where this automatic
calculation came from. No cell has been modified on load,
none of the conditions that would normally trigger a
calculation are present on Workbook_Open.
So, what happens? How do I deactivate the auto
calculation on workbook load, and more importantly how do
I reset the auto calculation after the workbook_open event?
Thanks for any tips
C.
I created a XLA addin that is already activated when
Excel XLS workbooks are opened. These XLS workbooks have
cell formulas that refer to a macro called Macro1 I put in
the XLA code. Problem: When a XLS workbook opens, Excel
automatically recalculates the workbook cell formulas that
use Macro1. I need to cancel this recalculation because
when loading, Workbooks don't have all the information
needed to evaluate the Macro1 return value.
I tried to cancel the calculation by using:
application.calculation = xlCalculationManual
in the Workbook_Open events (catched from the XLA). When
loading the XLS workbook, Excel crashes with the following
error message:
Execution error 1004: the 'calculation' method of
the 'application' object failed.
I never was able to find out where this automatic
calculation came from. No cell has been modified on load,
none of the conditions that would normally trigger a
calculation are present on Workbook_Open.
So, what happens? How do I deactivate the auto
calculation on workbook load, and more importantly how do
I reset the auto calculation after the workbook_open event?
Thanks for any tips
C.