So I did some more revisions and I most definitely have determined that the error is directly related to "writing" new information in the cells (ie: setting their value to either "no" or "")
Here is an update to the code. Take note that in the function, "UpdateYesNoCells()", I have two changes to the cells that do not impact their Value... this code works just fine. The issue, once again, is that I want to write either "no" or leave it blank (bold below):
Option Explicit
Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
Dim rngCellWithEventName As Range
Set rngCellWithEventName = ActiveSheet.Range("C18")
If ActiveCell = ActiveSheet.Range("C18") Then 'rngCellWithEventName Then
UpdateYesNoCells
End If
Application.ScreenUpdating = True
End Sub
Function UpdateYesNoCells()
Dim rngCellBeingChecked As Range
For Each rngCellBeingChecked In Range("H4:H33,M4:M33,H36:H65,M36:M45,M48:M53")
If rngCellBeingChecked.Value = "" Then
rngCellBeingChecked.Offset(0, 1).Interior.ColorIndex = 2
rngCellBeingChecked.Offset(0, 1).Locked = True
rngCellBeingChecked.Offset(0, 1).Value = ""
Else
rngCellBeingChecked.Offset(0, 1).Interior.ColorIndex = 19
rngCellBeingChecked.Offset(0, 1).Locked = False
rngCellBeingChecked.Offset(0, 1).Value = "no"
End If
Next rngCellBeingChecked
End Function
Bookmarks