I am trying to have Rows 6:8 hide/unhide depending on the value in cell B5 which I named Paint. After doing some searching on here I found some code that I thought would work. The Paint_Option sub runs properly when stepping through it, but I am struggling with making it run when B5 is updated.
Thank you!Sub Paint_Option() If Range("B5").Value = "Yes" Then [6:8].EntireRow.Hidden = False Else [6:8].EntireRow.Hidden = True End If End Sub Sub worksheet_change(ByVal target As Range) Set target = Range("B5") If target.Value = "Yes" Then Call Paint_Option End If If target.Value = "No" Then Call Paint_Option End If End Sub
Bookmarks