tlc53
Active Member
- Joined
- Jul 26, 2018
- Messages
- 412
- Office Version
- 365
- Platform
- Windows
Hi. I just can't get this VBA code to work. Basically, if the Year End Date is March, then it needs to hide rows 71:86.
I can't get the Month = 03 bit to work.
Thank you
I can't get the Month = 03 bit to work.
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("Year_End_Date")) Is Nothing Then
If Target.Cells.CountLarge > 1 Then Exit Sub
Select Case Target.Value
Case Is = Month("*/03/*")
Sheets("O7").Range("71:86,").EntireRow.Hidden = True
Case Is <> Month("*/03/*")
Sheets("O7").Range("71:86").EntireRow.Hidden = False
End Select
End If
End Sub
Thank you