sunshine076
Registered User.
- Local time
- Today, 11:27
- Joined
- Apr 6, 2009
- Messages
- 160
Morning to everyone, I have a piece of code that I am modifying by adding a select case to it but it keeps giving me a compile error on .visible. What I am doing is trying to hide inactive pictures and only show the name of active person with their logo. Any suggestions would be greatly appreciated. Thanks.
Private Sub Worksheet_Calculate()
Dim oPic As Picture
Me.Pictures.Visible = True
tbt = Range("p4")
Select Case tbt
Case tbt = "Eugene"
me.picture 328.visible = True 'Errors here on .visible
oPic 329 = False
oPic 330 = False
oPic 331 = False
oPic 332 = False
oPic 327 = False
Case tbt = "Lane"
oPic 327 = False
oPic 328 = False
oPic 329 = True
oPic 330 = False
oPic 331 = False
oPic 332 = False
End Select
End Sub
Private Sub Worksheet_Calculate()
Dim oPic As Picture
Me.Pictures.Visible = True
tbt = Range("p4")
Select Case tbt
Case tbt = "Eugene"
me.picture 328.visible = True 'Errors here on .visible
oPic 329 = False
oPic 330 = False
oPic 331 = False
oPic 332 = False
oPic 327 = False
Case tbt = "Lane"
oPic 327 = False
oPic 328 = False
oPic 329 = True
oPic 330 = False
oPic 331 = False
oPic 332 = False
End Select
End Sub