Hi all. I am trying to disable or deactivate the formulas in several cells as part of the workbook close event and reactive them during the workbook open event. The formulas contain an intentional circular reference and I'm trying to convert them to a text string so they won't be recognized as a circular reference when the workbook is opened again until after I enable iteration as part of the open event, after which I want to convert the text strings back to formulas. The purpose of this is to avoid the circular reference warning when the workbook is opened by users. I continue to get an error message in my code at the cell.formula lines in both of my subs below. Any help would be appreciated!
Private Sub Workbook_BeforeClose(Cancel As Boolean)
With Worksheets("sheet1").Range("B14:B2000")
.cell.Formula = "'" & cell.Formula
End With
Application.Iteration = False
End Sub
Private Sub Workbook_Open()
With Application
.Iteration = True
.MaxIterations = 1
End With
With Worksheets("sheet 1").Range("B14:B2000")
.cell.Formula = Right(cell.Formula, Len(cell.Formula) - 1)
End With
End Sub
Many thanks in advance.
Bookmarks