View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
GTVT06 GTVT06 is offline
external usenet poster
 
Posts: 141
Default Turn AutoCalc before calc takes place

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