I'm trying to hide a column if the case value is no.
I saved this in the sheet, not a module.
Private Sub Worksheet_Change(ByVal Target As Range)
ActiveSheet.Activate
If Not Application.Intersect(Range("C9"), Range(Target.Address)) Is Nothing Then
Select Case Target.Value
Case Is = "Yes":
Rows("10:10").EntireRow.Hidden = False
Case Is = "No":
Rows("10:10").EntireRow.Hidden = True
End Select
End If
End Sub
Worksheet Calculate Event
Yes
andNo
are being changed by a formula, theWorksheet Change
event will not be triggered when the value changes.Module1
(VBE >> Insert >> Module).Sheet1
.Module1
Sheet1
ThisWorkbook
Maybe it's related to a case-sensitive fail check. Try this code and tell us if this solve the issue: