PC Review


Reply
Thread Tools Rate Thread

How can I prevent calculations upon opening workbook?

 
 
=?Utf-8?B?UmFuZHk=?=
Guest
Posts: n/a
 
      30th Mar 2007
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
 
Reply With Quote
 
 
 
 
Jim Rech
Guest
Posts: n/a
 
      30th Mar 2007
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" <(E-Mail Removed)> wrote in message
news:7DE36124-D956-41BF-B4AB-(E-Mail Removed)...
>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


 
Reply With Quote
 
=?Utf-8?B?UmFuZHk=?=
Guest
Posts: n/a
 
      2nd Apr 2007
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" <(E-Mail Removed)> wrote in message
> news:7DE36124-D956-41BF-B4AB-(E-Mail Removed)...
> >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

>
>

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      2nd Apr 2007
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" <(E-Mail Removed)> wrote in message
> > news:7DE36124-D956-41BF-B4AB-(E-Mail Removed)...
> > >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
 
Reply With Quote
 
=?Utf-8?B?UmFuZHk=?=
Guest
Posts: n/a
 
      2nd Apr 2007
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" <(E-Mail Removed)> wrote in message
> > > news:7DE36124-D956-41BF-B4AB-(E-Mail Removed)...
> > > >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
>

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      2nd Apr 2007
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" <(E-Mail Removed)> wrote in message
> > > > news:7DE36124-D956-41BF-B4AB-(E-Mail Removed)...
> > > > >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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
prevent workbook opening if already open by someone else KevHardy Microsoft Excel Misc 0 4th Mar 2010 10:02 AM
prevent second workbook opening =?Utf-8?B?am9lZW5n?= Microsoft Excel Programming 2 31st Aug 2007 03:08 PM
Re: Prevent worksheet from opening in a workbook Gord Dibben Microsoft Excel Worksheet Functions 2 18th Jan 2007 05:42 AM
Re: Prevent worksheet from opening in a workbook Paul B Microsoft Excel Worksheet Functions 0 12th Dec 2006 11:28 PM
How to prevent any one from opening my workbook =?Utf-8?B?TU1DTQ==?= Microsoft Excel New Users 5 25th Aug 2006 07:54 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:28 AM.