Hello Everyone,
Here is my code:
What I'm trying to do under VBA is when J5 = NO, change M5 to 0. That I can accomplish. However if I do add that code, the proceeding hide rows gives me the run time
1004 error:
Unable to set the hidden property of the Range Class
However if I remove the problematic highlight and manually change the value of m5, it hides/unhides without issue.
Any Ideas??
Here is my code:
What I'm trying to do under VBA is when J5 = NO, change M5 to 0. That I can accomplish. However if I do add that code, the proceeding hide rows gives me the run time
1004 error:
Unable to set the hidden property of the Range Class
However if I remove the problematic highlight and manually change the value of m5, it hides/unhides without issue.
Any Ideas??
Code:
Sub Worksheet_Change(ByVal Target As Range)
Dim A1 As Range
Set A1 = Range("J5")
If Not Intersect(Target, A1) Is Nothing Then
Application.EnableEvents = False
Target.Value = UCase(Target.Value)
Application.EnableEvents = True
End If
[COLOR=#ff0000]If Range("J5") = "NO" Then [/COLOR]
[COLOR=#ff0000]Range("m5") = 0 [/COLOR]
[COLOR=#ff0000]End If[/COLOR]
If Range("M5") = "0" Then
Rows("59:89").EntireRow.Hidden = False
Rows("59:89").EntireRow.Hidden = True
End If