View Single Post
  #1   Report Post  
Pennington
 
Posts: n/a
Default Hiding cells on condition

I am trying to hide a range of cells when the value in another cell is FALSE
and show the range of cells when the value is TRUE. My code is as follows but
it doesn't work
Private Sub Workbook_Open()
If Range("C4").Value = False Then
Range("E4:M40").Hide = True
End If
If Range("C4").Value = True Then
Range("E4:M40").Unhide = False
End Sub

How do I make this work?