PDA

View Full Version : Solved: Make textbox visable or not visable on Userform



Barryj
06-26-2008, 09:16 AM
Is it possible to make a textbox visable when a checkbox is checked and not visable when not checked?

I tried this code but it is not working.

Private Sub Checkbox1_Click
If CheckBox1 = True Then
TextBox1.visable = True
Sheets("Workings2").Range("D1") ="NCR"
TextBox2.Value = Sheets("Workings2").Range("D3")
Else
If CheckBox1 = False Then
TextBox1.visable = False
Sheets("Workings2").Range("D1") = ""
TextBox1.Value = Sheets("Workings2").Range("D3")
End If
End If
End Sub

RonMcK
06-26-2008, 09:20 AM
First, yes, you should be able to. Second, try it again spelling visible with and 'i' (eye) instead of an 'a'.

Cheers!

Barryj
06-26-2008, 09:24 AM
Thanks Ron that has fixed it, it's 0220 here and the brains in low gear, thanks again.

RonMcK
06-26-2008, 09:30 AM
G'day (or should it be G' Night) Barryj,

When in doubt review the Properties panel in VBE.

Cheers,