I've written some code but it's not working and I am not sure why.
I want to make sure the button is hidden when the sheet is opened and only when a value appears in E24 should the button appear.
Could someone please point out my mistake and how to fix it?
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Cells(5, 24).Value <> "1" Then
ActiveSheet.Shapes("Button412").Visible = True
Else
ActiveSheet.Shapes("Button412").Visible = False
End If
Application.ScreenUpdating = True
End Sub
I want to make sure the button is hidden when the sheet is opened and only when a value appears in E24 should the button appear.
Could someone please point out my mistake and how to fix it?