dannyok90
Board Regular
- Joined
- Aug 30, 2016
- Messages
- 115
Im trying to turn some shapes on and off, this is the code im using.
Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Range("J9").Value
Case "GREEN"
With Me.Shapes("GREEN_TIME")
.Visible = Not .Visible
End With
Case "RED"
With Me.Shapes("RED_TIME")
.Visible = Not .Visible
End With
Case "AMBER"
With Me.Shapes("AMB_TIME")
.Visible = Not .Visible
End With
End Select
End Sub
It works but I have to turn the shapes on and off.
I just want to be able to select one of the shapes from the drop down list and its that one that's visible?
any ideas?
Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Range("J9").Value
Case "GREEN"
With Me.Shapes("GREEN_TIME")
.Visible = Not .Visible
End With
Case "RED"
With Me.Shapes("RED_TIME")
.Visible = Not .Visible
End With
Case "AMBER"
With Me.Shapes("AMB_TIME")
.Visible = Not .Visible
End With
End Select
End Sub
It works but I have to turn the shapes on and off.
I just want to be able to select one of the shapes from the drop down list and its that one that's visible?
any ideas?