View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
TDC TDC is offline
external usenet poster
 
Posts: 14
Default If then to hide a combo box

Joel,

Thanks for the help, but I still not able to make it work. I even tried a
blank workbook and worksheet, but no change. Any idea what I am missing?

"Joel" wrote:

I got the code to work. I only added a workseet reference.


Sub test_form()
If Worksheets("main").Range("AJ19").Value 1 Then
UserForm1.ComboBox1.Visible = True
Else
UserForm1.ComboBox1.Visible = False
End If
UserForm1.Show

End Sub




"TDC" wrote:

I am trying to make a combo box appear if a value is greater than 1 or hide
if it is not. Below is what I have, but it does not work. Suggestions?

Private Sub test_change()
If Range("AJ19").Value 1 Then
UserForm1.ComboBox1.Visible = True
Else
UserForm1.ComboBox1.Visible = False
End If
End Sub