Avoiding Circular references with iteration--getting rid of error box?

Ranger_j

New Member
Joined
Jul 1, 2008
Messages
21
I have a worksheet with some references that Excel sees as circular. Actually, it is just some conditional if statements that calculate quantities from the front if front information is given, and from the back if back information is given. If I change the options to iterate the calculation, it takes Excel maybe 1 or 2 to get it right.

The problem is, I have other users of this sheet, so I want to turn the iteration option on when the spreadsheet is opened. I do this in VBA:

Code:
Private Sub Workbook_Open()
Application.CellDragAndDrop = False
Application.Iteration = True
Application.MaxIterations = 10000
Application.MaxChange = 0.0001
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CellDragAndDrop = True
Application.Iteration = False
End Sub

This does the job, but when the spreadsheet is opened, Excel gives me the standard warning box telling me I have a circular reference. No matter what choice I go with, the sheet is then set to iterate and problem solved.

How can I set this up so I DON'T have to click though a warning box every time I open the sheet?

Thanks for your help, whoever you are that has the answer!
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

Forum statistics

Threads
1,214,918
Messages
6,122,255
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top