Automatic Calucalation Default

B

Brandon

I've read the previous threads regarding the default calculation setting
returning to "Manual" I do use personal.xls for storing macros and suspcet
this is related. The expert advice was to open Personal.xls to start the
excel session and change the calculation setting to automatic.
Unfortunately, personal.xls does not have a worsheet associated with it,
therefore "options" is not available on the tools menu. Please advise.
 
D

Dave Peterson

You could add a workbook, change the calculation.

But if you close that temporary workbook, I think (I don't recall for sure) that
excel will pick up the calculation mode from the next workbook opened.

Option Explicit
Sub auto_open()

Dim wkbk As Workbook

Set wkbk = Workbooks.Add
Application.Calculation = xlCalculationAutomatic
'wkbk.close savechanges:=false

End Sub

If you feel like experimenting, uncomment that .close line and open a workbook
that was saved with calculation set to manual.

If xl changes calculation mode back to manual, then don't use that "wkbk.close"
line
 
D

Dave Peterson

I just tested. If you close that workbook (and there is no activeworkbook, then
excel may change the calculation mode.

And I think I like this just a bit better.

Option Explicit
Sub auto_open()

Dim wkbk As Workbook
If ActiveWorkbook Is Nothing Then
Set wkbk = Workbooks.Add
Else
'do nothing
End If

Application.Calculation = xlCalculationAutomatic

End Sub


It just checks to see if it HAS to add another workbook first.
 
G

Gord Dibben

Brandon

Personal.xls is open and hidden.

Just go to Window>Unhide and select Personal.xls.

With it open, make your settings change then hide again and save.


Gord Dibben Excel MVP
 
Top