ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Userform conditional fields (https://www.excelbanter.com/excel-programming/303258-userform-conditional-fields.html)

newbie

Userform conditional fields
 
Hi,

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

TIA



papou[_9_]

Userform conditional fields
 
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" a écrit dans le message de
...
Hi,

Can someone please help me? I want to create a userform where textbox2 is

invisible unless textbox1 = "New".

TIA





Bob Phillips[_6_]

Userform conditional fields
 
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" wrote in message
...
Hi,

Can someone please help me? I want to create a userform where textbox2 is

invisible unless textbox1 = "New".

TIA






All times are GMT +1. The time now is 08:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com