Turning off circular reference warning

C

Craig

I have a worksheet that has a circular reference but I have my Interations
set to 1000 so the circular turns off. I have a macro setup so when other
users open the worksheet, it turns in interations on and sets it to max.
interations to 1000. The problem is, when I open the workbook, the
worksheet calculates before my macro for seting the interation level, and
the circular reference warning appears. IOnce I it cancel, then the
interation macro runs and there circular is taken care of. Is there anyway
to make my interation maco occur before the worksheet calculates and causes
a circular reference warning. I have end users who panic when any type of
message appears, and want to eliminate any stress in their lives.

Thanks for any help!
 
T

Tom Ogilvy

in the workbook before close event, remove the circular references or make
the formulas text strings. In the workbook.Open event, change iterations
and restore the formulas.
 
C

Craig

I not understanding what you are saying. I am sort of brain dead at this
time. Are you saying I should delete the circular reference cell?
 
T

Tom Ogilvy

disable the formula
Cell.Formula = "Z" & cell.Formula

enable the formula
Cell.Formula = Right(Cell.Formula,len(cell.formula)-1)
 
C

Craig

Not sure how to do this. Can anyone help?


Tom Ogilvy said:
in the workbook before close event, remove the circular references or make
the formulas text strings. In the workbook.Open event, change iterations
and restore the formulas.
 
J

John Tjia

Craig:

The idea is to add code so that when you save or close the file, it
deactives the formula(s) in the model that is causing the iteration.
Thus, when you open the file, there is no circular reference warning
from Excel. As part of the Auto_Open sequence, which comes after
Excel calculates, you can put have code that turns the formula(s) back
on again -- after you set the Iteration back on, of course.
 
C

Craig

John-

Since I am a novice at programming, can you give me an example as to how I
would deactivate a formula using code. Thanks for your help!
 

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