Userform: Textbox changing with selection in combobox (list)

N

NorTor

Hello,

I am stuck on how to solve this problem.

I have an userform with a combobox, which has a source in a sheet (a
table of roughly 200 rows)

The source table consists of two columns (and about 200 rows, already
mentioned).

Now, I am trying to get the textbox to show the text from column 2 of
my source table (the combobox gives the user the choice to select from
column 1 of the source table). If the user changes his selection in
the combobox, the textbox should then change to the corresponding
value from column two.

Please, can anyone help me a bit further on the way...? I figure it
might be some 'on-change' event of the combobox...


Cheers
NorTor
 
B

Bob Phillips

Use VLOOKUP ws function

Textbox1.Text = Application.VLookupCombobox1.Value, Range("A1:B20"), 2,
False)

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
N

NorTor

Dear Bob!

Gonna try it right way!
And this don't even need an onchange event, right? It is changing when
value in combobox is I guess.

Best regards :)
NorTor
 
B

Bob Phillips

You will need to have some event to trigger the population of the textbox,
such as a combobox click event.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Top