VBA Turn off circular reference warning

jscranton

Well-known Member
Joined
May 30, 2011
Messages
707
I have a "master" excel that loops through a folder of excels, opens them, runs a variety of macros and then saves and closes them. I have always had some excels that crash the application and I finally narrowed it down to excels that have a circular reference in them. I have disabled alerts and so Excel just crashes completely. I have tried several ways to turn off this warning including:

Code:
  Private Sub Workbook_Open()
       Application.calculation = xlCalculationManual
       
      If errormsg Then
          SendKeys "{esc}", True
      End If


   End Sub

Neither of those seem to work. Any other ideas?
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Try this...

Code:
Application.Iteration = True

From the VBA help (F1)
Iteration Property
Microsoft Excel will use iteration to resolve circular references.

Note: this is an application level setting. Set it for an instance of Excel and it applies to all workbooks.
 
Upvote 0
change the number of iterations > excel options > formulas > maximum iterations

though the potential is there are errors in the values and that might effect the results you are pulling

Application.MaxIterations = 1
 
Upvote 0

Forum statistics

Threads
1,215,584
Messages
6,125,673
Members
449,248
Latest member
wayneho98

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