I have a large workbook that I use regularly for project modeling. I am a novice VBA user, but there are a number of simple macros built in throughout. Many of these macros are used to show or hide certain data fields based on what has been selected in in other sections. This has been working fine until recently, when I started getting the "Code execution has been interrupted" pop-up. I have not added any breakpoints and I have additionally tried to clear all breakpoints so I am not sure what is causing this. When I use the debugger, it highlights the code from two of the worksheets, which is pasted below. The code in both is identical apart from differences in the specific range. This same code is used on other worksheets in the same workbook but does not trigger the interruption. Additionally, if I open older versions of the workbook, I do not get this interruption unless the newer version (which has started triggering the issue) is also open, in which case the same worksheets seem to be "afflicted." The newer version employs some similar additional code, but it references different parts of the workbook.
Any help in diagnosing and solving this issue would be greatly appreciated.
Private Sub Worksheet_Calculate()
Application.ScreenUpdating = False
Dim c As Range
For Each c In Range("F5:V5")
c.EntireColumn.Hidden = (c.Value = "")
Next c
Application.ScreenUpdating = True
End Sub
Bookmarks