Reputation: 169
Good Evening All,
I am trying to increase usability to a workbook by having an activex combobox vanishes when it's not needed to reduce confusion when creating a chart. The problem is, once it vanishes, it never comes back. Do I need to add more to my code? Is this actually just deleting my combobox?
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Cells(1, 1).Value > "0" Then
Me.ComboBox2.Visible = True
Else
Me.ComboBox2.Visible = False
End If
Application.ScreenUpdating = True
End Sub
Thanks in advance!
Upvotes: 0
Views: 52
Reputation: 13386
I think you have to remove double quotes around 0
furthermore your code can be simplified to:
Private Sub Worksheet_Change(ByVal Target As range)
Me.ComboBox2.Visible = Cells(1, 1).value > 0
End Sub
Upvotes: 4