Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

manual calculate for one workbook 1

Status
Not open for further replies.

amberH

Programmer
Jun 10, 2002
36
0
0
CA
Hi all,
How can I set a workbook to manual calculate?
I have a workbook that multiple users use. If autocalculate is one, it is SLOW. I know that I can set my options to manual calculate, but then all workbooks I open after this are manual, which isn't what I want.
Is there some way I can set it when the workbook opens, and set it back to auto when the workbook closes??
Thanks,
amber
 
Amber,

Set up Workbook_Open and Workbook_BeforeClose event procedures as follows:

Code:
Private Sub Workbook_Open()
  Application.Calculation = xlCalculationManual
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
  Application.Calculation = xlCalculationAutomatic
End Sub

Post back if you need more detail.

Regards,
Mike
 
Thanks!
That's exactly what I wanted.
I figured commands just like those existed, but I couldn't find them anywhere in Help.
Thanks again!
amber
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top