Userform: Textbox changing with selection in combobox (list)

  • Thread starter Thread starter NorTor
  • Start date Start date
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
 
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)
 
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
 
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top