Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 213
Default How can I prevent calculations upon opening workbook?

I have the following macro that works great upon exiting my workbook but how
can I modify it to prevent calculations from running whenever someone opens
it? There are so many formulas and so much data on each sheet that if we
don't calculate each sheet manually, then we have to end task on Excel
because it will not complete the calculations.

Thanks!

Randy

Private Sub Workbook_Open()

With Application
.Calculation = xlManual
.CalculateBeforeSave = False
End With

End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default How can I prevent calculations upon opening workbook?

If a workbook needs to be calced and calc mode is automatic Excel will calc
it upon opening it before startup macros run. So setting calc mode to
manual in Sub Workbook_Open is too late. Set it to manual before opening.

--
Jim
"Randy" wrote in message
...
I have the following macro that works great upon exiting my workbook but
how
can I modify it to prevent calculations from running whenever someone
opens
it? There are so many formulas and so much data on each sheet that if we
don't calculate each sheet manually, then we have to end task on Excel
because it will not complete the calculations.

Thanks!

Randy

Private Sub Workbook_Open()

With Application
.Calculation = xlManual
.CalculateBeforeSave = False
End With

End Sub


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 213
Default How can I prevent calculations upon opening workbook?

Makes sense but I have not been able to figure out how. Any help would be
appreciated.

Thanks!

"Jim Rech" wrote:

If a workbook needs to be calced and calc mode is automatic Excel will calc
it upon opening it before startup macros run. So setting calc mode to
manual in Sub Workbook_Open is too late. Set it to manual before opening.

--
Jim
"Randy" wrote in message
...
I have the following macro that works great upon exiting my workbook but
how
can I modify it to prevent calculations from running whenever someone
opens
it? There are so many formulas and so much data on each sheet that if we
don't calculate each sheet manually, then we have to end task on Excel
because it will not complete the calculations.

Thanks!

Randy

Private Sub Workbook_Open()

With Application
.Calculation = xlManual
.CalculateBeforeSave = False
End With

End Sub



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default How can I prevent calculations upon opening workbook?

Open excel with a blank (new) workbook.
Change the calculation mode
file|open your workbook



Randy wrote:

Makes sense but I have not been able to figure out how. Any help would be
appreciated.

Thanks!

"Jim Rech" wrote:

If a workbook needs to be calced and calc mode is automatic Excel will calc
it upon opening it before startup macros run. So setting calc mode to
manual in Sub Workbook_Open is too late. Set it to manual before opening.

--
Jim
"Randy" wrote in message
...
I have the following macro that works great upon exiting my workbook but
how
can I modify it to prevent calculations from running whenever someone
opens
it? There are so many formulas and so much data on each sheet that if we
don't calculate each sheet manually, then we have to end task on Excel
because it will not complete the calculations.

Thanks!

Randy

Private Sub Workbook_Open()

With Application
.Calculation = xlManual
.CalculateBeforeSave = False
End With

End Sub




--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 213
Default How can I prevent calculations upon opening workbook?

That's what I currently do. I was just hoping there was something
programatically that could be done.

Thanks!

"Dave Peterson" wrote:

Open excel with a blank (new) workbook.
Change the calculation mode
file|open your workbook



Randy wrote:

Makes sense but I have not been able to figure out how. Any help would be
appreciated.

Thanks!

"Jim Rech" wrote:

If a workbook needs to be calced and calc mode is automatic Excel will calc
it upon opening it before startup macros run. So setting calc mode to
manual in Sub Workbook_Open is too late. Set it to manual before opening.

--
Jim
"Randy" wrote in message
...
I have the following macro that works great upon exiting my workbook but
how
can I modify it to prevent calculations from running whenever someone
opens
it? There are so many formulas and so much data on each sheet that if we
don't calculate each sheet manually, then we have to end task on Excel
because it will not complete the calculations.

Thanks!

Randy

Private Sub Workbook_Open()

With Application
.Calculation = xlManual
.CalculateBeforeSave = False
End With

End Sub



--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default How can I prevent calculations upon opening workbook?

Jim's point was that there was nothing you could do in that workbook that would
help.

But you could use two workbooks.

The first workbook changes calculation to manual, then opens the real workbook,
then closes itself (since it's done).

Kind of like:

Option Explicit
Sub auto_open()
Application.Calculation = xlCalculationManual
Workbooks.Open Filename:="c:\my documents\excel\book2.xls"
ThisWorkbook.Close savechanges:=False
End Sub

Randy wrote:

That's what I currently do. I was just hoping there was something
programatically that could be done.

Thanks!

"Dave Peterson" wrote:

Open excel with a blank (new) workbook.
Change the calculation mode
file|open your workbook



Randy wrote:

Makes sense but I have not been able to figure out how. Any help would be
appreciated.

Thanks!

"Jim Rech" wrote:

If a workbook needs to be calced and calc mode is automatic Excel will calc
it upon opening it before startup macros run. So setting calc mode to
manual in Sub Workbook_Open is too late. Set it to manual before opening.

--
Jim
"Randy" wrote in message
...
I have the following macro that works great upon exiting my workbook but
how
can I modify it to prevent calculations from running whenever someone
opens
it? There are so many formulas and so much data on each sheet that if we
don't calculate each sheet manually, then we have to end task on Excel
because it will not complete the calculations.

Thanks!

Randy

Private Sub Workbook_Open()

With Application
.Calculation = xlManual
.CalculateBeforeSave = False
End With

End Sub



--

Dave Peterson


--

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
prevent workbook opening if already open by someone else KevHardy Excel Discussion (Misc queries) 0 March 4th 10 10:02 AM
Prevent worksheet from opening in a workbook laurenm Excel Worksheet Functions 5 January 18th 07 05:42 AM
How to prevent any one from opening my workbook MMCM New Users to Excel 5 August 25th 06 07:54 PM
Numbers stored as text prevent calculations 525047 Excel Worksheet Functions 9 August 16th 06 05:12 PM
How do I prevent AutoRun Macros when Programmatically Opening Workbook? Joseph Geretz Excel Programming 27 March 26th 06 11:26 PM


All times are GMT +1. The time now is 03:21 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"