ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,785
- Office Version
- 2007
- Platform
- Windows
I have various command buttons on my worksheet.
I wish to hide / show specific command buttons depending on whether a specific cell has a value or not.
Just to start me off i have the following BUT the command button is shown all the time.
Can you advise what ive done wrong please.
Basicallically wish the relevant button to toggle visability whether it cell in question is empty or has a value.
Should be simple enough but cant see this error here ?
Thansk
I wish to hide / show specific command buttons depending on whether a specific cell has a value or not.
Just to start me off i have the following BUT the command button is shown all the time.
Can you advise what ive done wrong please.
Basicallically wish the relevant button to toggle visability whether it cell in question is empty or has a value.
Should be simple enough but cant see this error here ?
Thansk
VBA Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("B4") = "" Then ' If there is a value in cell then hide button
AprilStartButton.Visible = True
End If
If Range("E4") = "" Then ' If there is a value in cell then hide button
MayButton.Visible = True
End If
End Sub