View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Charlie Charlie is offline
external usenet poster
 
Posts: 703
Default ComboBox.visible = False or True

I couldn't get that to work: I said combobox, but meant textbox, earlier, so
let me start over:

I have ComboBox1 & TextBox1. A change is made to ComboBox1, which affects
TextBox1. If TextBox1 is blank (no string), then I need the property
..visible of TextBox1 to be set to False. I think this all happens here?

Private Sub ComboBox1_Change()
Worksheets("sheet1").Range("C16") = Me.ComboBox1.Value
TextBox1 = Worksheets("Sheet1").Range("B23").Value
If TextBox1.Value = "" Then
Me.Controls.TextBox1.Visible = False
Else
Me.Controls.Text1.Visible = True
End If
End Sub

....but the line Me.Controls.Text1.Visible gives me an error.
It must be close to being right...