malcolmlyle
New Member
- Joined
- May 20, 2024
- Messages
- 8
- Office Version
- 365
- Platform
- Windows
I've been trying to work this out and searching multiple sources and forums to no avail.
MY APPLICATION:
We are an engineering firm. I have a "Special" Workbook that peforms calcaultions that need to have Iterations=TRUE to get past Excel throwing up an error. There is not, in fact, a circuilar reference, it just looks like there is becuase I'm searching through a network of "FROM" and "TO" node names to trace loads or fault current calcualted values either up or down the tree.
For crash protection, MaxIterations is set to 100, becuase it's possilbe to create a circular reference while doing data. If anyone is intersted in this, I can share an example, but it's not really the issue because if Iterations is turned on and the nodes are configured correctly, it works brilliantly.
THE PROBLEM:
There are conditions where when I open this workbook in a special circumstance:
If I open the "Special" workbook first, there are no issues. You can open a plain jane workbook and it will not alter settings as long as the first WB opened is the one with Iterations=TRUE.
I've tried all sorts of Workbook and Worksheet events (open, activate, etc.) to programmatically turn it back on, but none of these actually work. I've tried putting these in this "Special" workbook and my Personal.xlb. As near as I can tell this code does nothing, no matter where it lives:
What on earth do I need to do to get this to set correctly?
MY APPLICATION:
We are an engineering firm. I have a "Special" Workbook that peforms calcaultions that need to have Iterations=TRUE to get past Excel throwing up an error. There is not, in fact, a circuilar reference, it just looks like there is becuase I'm searching through a network of "FROM" and "TO" node names to trace loads or fault current calcualted values either up or down the tree.
For crash protection, MaxIterations is set to 100, becuase it's possilbe to create a circular reference while doing data. If anyone is intersted in this, I can share an example, but it's not really the issue because if Iterations is turned on and the nodes are configured correctly, it works brilliantly.
THE PROBLEM:
There are conditions where when I open this workbook in a special circumstance:
- Excel is not running yet, no other workbooks open (expecialy not one with Iterations enabled)
- I open a plain jane workbook - without iterations enabled
- Then I open my "Special" workbook that is saved with iterations enabled
If I open the "Special" workbook first, there are no issues. You can open a plain jane workbook and it will not alter settings as long as the first WB opened is the one with Iterations=TRUE.
I've tried all sorts of Workbook and Worksheet events (open, activate, etc.) to programmatically turn it back on, but none of these actually work. I've tried putting these in this "Special" workbook and my Personal.xlb. As near as I can tell this code does nothing, no matter where it lives:
VBA Code:
Private Sub Workbook_Open()
With Application
.Iteration = True
.MaxIterations = 100
.MaxChange = 0.001
End With
End Sub
What on earth do I need to do to get this to set correctly?