Userform conditional fields

N

Newbie

Hi,

Can someone please help me? I want to create a userform where textbox2 is invisible unless textbox1 = "New".

TIA
 
P

papou

Hi
Set Visible property of Textbox2 to False and place this into the userform's
code:
Private Sub UserForm_Initialize()
Me.TextBox2.Visible = False
End Sub
Private Sub TextBox1_Change()
If TextBox1 = "New" Then Me.TextBox2.Visible = True
End Sub

HTH
Cordially
Pascal

Newbie said:
Hi,

Can someone please help me? I want to create a userform where textbox2 is
invisible unless textbox1 = "New".
 
B

Bob Phillips

TextBox2.Visible = (Textbox1.Text="New")

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

Newbie said:
Hi,

Can someone please help me? I want to create a userform where textbox2 is
invisible unless textbox1 = "New".
 
Top