Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Turn AutoCalc before calc takes place
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? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Turn AutoCalc before calc takes place
Won't work since I can't control the mode that Excel is in when the workbook
is opened. Most users' machines are in autocalc mode as a matter of course. "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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Turn AutoCalc before calc takes place
How about creating a 2nd workbook to open the real workbook.
It can change the calculation mode to manual, then open the real workbook, then close itself. 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? -- Dave Peterson |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Turn AutoCalc before calc takes place
Thought of that would prefer not to if there is another solution (just
another step in the user experience). Looks like there isn't another solution so this is probably the way to go. Thanks. "Dave Peterson" wrote: How about creating a 2nd workbook to open the real workbook. It can change the calculation mode to manual, then open the real workbook, then close itself. 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? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Turn off Autocalc before opening sheet | Excel Discussion (Misc queries) | |||
How come the spreadsheet says calc when it is set to autocalc | Excel Discussion (Misc queries) | |||
Turn AutoCalc off on opening file | Excel Programming | |||
autocalc to complicated to turn off | Setting up and Configuration of Excel | |||
turn off autocalc | Excel Programming |