View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Susan Susan is offline
external usenet poster
 
Posts: 1,117
Default ComboBox.visible = False or True

If TextBox1.Value = "" Then
Me.Controls.TextBox1.Visible = False
Else
Me.Controls.Text1.Visible = True
End If


TYPO
Me.Controls.TextBox1.Visible = True

susan


On Dec 21, 11:32*am, Charlie
wrote:
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...