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:
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!
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!