Force iterations in personal.xls

D

Don

All of my spreadsheets have circular references, usually quite a few. I just
got some code to force Automatic Calculation every time excel is opened by
way of embedding the code in personal.xls. I'd also like to force iterations
for all spreadsheets through some vb in my personal.xls too. Ideally, I'd
like the code to set the checkmark for Iteration and also set values for
Maximum Iterations and Maximum Change. Any assistance would be greatly
appreciated. Thanks.
 
G

Gord Dibben

As simple as turning on the macro recorder.

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 1/30/2008 by Gord Dibben
'

'
With Application
.Iteration = True
.MaxIterations = 999
.MaxChange = 0.001
End With
ActiveWorkbook.PrecisionAsDisplayed = False
End Sub

In Personal.xls Thisworkbook module enter this event code to set the calculation
and iteration mode for the application.

Private Sub Workbook_Open()
With Application
.Calculation = xlCalculationAutomatic
.Iteration = True
.MaxIterations = 999
.MaxChange = 0.001
End With
End Sub


Gord
 

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