Userform TextBox hiden / visible

ipbr21054

Well-known Member
Joined
Nov 16, 2010
Messages
5,237
Office Version
  1. 2007
Platform
  1. Windows
Hi,
I have a userform where i have two TextBoxes that may clash.
So i am trying to write something that doesnt show one if the other has a value.

Basically if TB1 is empty then show TB10 but if TB1 has a value then TB10 hiden

I tried this but wasnt hidden when i wrote a value

Rich (BB code):
Private Sub TextBox6_Change()
    If TextBox6.Value = True Then
       TextBox10.Visible = False
    End If
End Sub
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
How about
VBA Code:
Private Sub TextBox6_Exit(ByVal Cancel As MSForms.ReturnBoolean)
   Me.TextBox10.Visible = Me.TextBox6.Value = ""
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,594
Messages
6,125,723
Members
449,255
Latest member
whatdoido

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top