ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,226
- Office Version
- 2007
- Platform
- Windows
Hi,
On my userform i have 5 TextBoxes which i use to search for purposes then the listbox is populated.
Currently i can type in each one leaving text in them but im looking to clear each one when another is selected.
See photo example.
What i would like to be able to do is this if you could advise please.
Lets say i type ABC in the first textbox but i then type XYZ in the last textbox.
When i select the last textbox the code should clear the ABC from the first on.
Basically only allowing the user to show text in any one textbox at a time.
I can write an incorrect long winded code but not sure how to do it correctly in only a few lines.
Each TextBox has a custom name.
TextBoxBlank
TextBoxVehicle
TextBoxItem
TextBoxProgrammer
TextBoxChip
On my userform i have 5 TextBoxes which i use to search for purposes then the listbox is populated.
Currently i can type in each one leaving text in them but im looking to clear each one when another is selected.
See photo example.
What i would like to be able to do is this if you could advise please.
Lets say i type ABC in the first textbox but i then type XYZ in the last textbox.
When i select the last textbox the code should clear the ABC from the first on.
Basically only allowing the user to show text in any one textbox at a time.
I can write an incorrect long winded code but not sure how to do it correctly in only a few lines.
Each TextBox has a custom name.
TextBoxBlank
TextBoxVehicle
TextBoxItem
TextBoxProgrammer
TextBoxChip