Turn AutoCalc before calc takes place
GTVT06
Note: if a workbook set to automatic calculation is opened prior to opening the
workbook with the BeforeClose code, calculation will revert to automatic because
the first workbook sets the mode for subsequent workbooks.
Gord Dibben MS Excel MVP
On Sat, 5 Jan 2008 10:28:00 -0800 (PST), GTVT06 wrote:
On Jan 5, 12:19*pm, Mitch Powell
wrote:
It is critical that a particular workbook NOT calculate upon opening, so I
used the following:
Private Sub Workbook_Open()
* *Application.Calculation = xlCalculationManual
End Sub
The problem is that if calculation is is already in auto mode when workbook
is opened, calculation takes place before this code can run and turn it off. *
Any ideas?
What if you were to have the workbook set the calculation mode to
manual before closing the workbook so next time it's opened it's
already set to manual and wont auto calculate?
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.Calculation = xlCalculationManual
End Sub
|