Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Turn off Autocalc before opening sheet Kevin Excel Discussion (Misc queries) 0 October 31st 09 08:56 PM
How come the spreadsheet says calc when it is set to autocalc Mike Excel Discussion (Misc queries) 1 August 29th 07 04:16 PM
Turn AutoCalc off on opening file Mitch Powell Excel Programming 1 November 16th 06 09:46 PM
autocalc to complicated to turn off lasse Setting up and Configuration of Excel 2 January 10th 06 12:31 AM
turn off autocalc barrfly[_3_] Excel Programming 1 June 7th 05 02:30 PM


All times are GMT +1. The time now is 03:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"