Dependent Text Box In User Form

Closed
azmiismail Posts 17 Registration date Thursday March 3, 2011 Status Member Last seen July 20, 2011 - Mar 26, 2011 at 01:45 PM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Mar 27, 2011 at 09:12 AM
Hello,
Let say I have a table below and I would like to make my user form second text box to automatically display the result base on my input at the first text box,how can I achieve that?It is is easy to do that by normal combo box data validation in excel worksheet,but how does one apply data validation in user form input boxes?

Number Name
1 John
2 Kim

When I input "1" at my first text box and hit Enter/Tab key,my second text box will automatically display "John".When I input "2" at my first text box than "Kim" will be display in my second text box.Can somebody supply me with the necessary code and guide me please....I'm still a beginner with VBA codes.

Thanks
Related:

1 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Mar 27, 2011 at 09:12 AM
use onchange event to do that
0