Help with Workbook Calculation

A

Ayo

I want to set the calculation option for my ActiveWorkbook to Manual. How do
I accomplish that without using the code below which set the option for all
open workbooks?

Private Sub Workbook_Open()
Application.Calculation = xlCalculationManual
End Sub
 
C

Charles Williams

There is no simple way to do this because Excel does not have a
Workbook.Calculate method.

The more complex way of achieveing something like this (which I use in my
commercial FastExcel product) is to use an Application level event to switch
Worksheet.EnableCalculation off for all the sheets in all the inactive
workbooks, and switch Worksheet.EnableCalculation on for all the sheets in
the activeworkbook. Note that the EnableCalculation property is not saved
with a workbook. Then you would also need a routine to handle manual
calculation of the disabled workbooks etc etc.

regards
Charles
___________________________________
The Excel Calculation Site
http://www.decisionmodels.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top