excel vba autopopulate textbox
got another question. I have a few forms set up for my client and some of the data is needed on more than one form. The user will input a client name and client id on the client tab. When they open a new form to enter financial info I have a combobox with the newly created client names and would love to have the client id automatically show up based on th开发者_如何学Goe client name. I have used a combobox where i put in a range in the rowsource and then set the bound column to match the client id. But you still have to choose the correct client id.
So is there a way I can simply have the client id filter into the box upon selection of the client name? I am not showing code on this b/c I can't really figure where to start and I am def no VB master
As always...Thanks a ton!
You should be able to do this without VB code in the following way. On the client sheet have two columns side by side. Looking like
Client Name Client ID
===========================
IBM 1
HP 2
Microsoft 3
Now, on the next sheet, drag a combobox from the Developer tab. Insert a Form Control ComboBox, do not pick an ActiveX ComboBox. Right click on the ComboBox. Select Format Control. Got to the Control Tab. For Input Range, select the 2 column range on the Client Sheet (i.e. from IBM to 3). For Cell Link, select a result cell.
Now, your ComboBox should list IBM, HP, Microsoft. When you select an item the Cell Link should display the corresponding Client ID.
精彩评论