linking text box with seperate combo box list

M

mikey_may

I have a combo box with 7 items to choose from a named
range - Range1, once 1 has been selected how do I place a
value in a seperate text box from another named range -
Range2

I.e. Range1 consists of 7 items A1 to A7 and Range2 is in
B1 to B7, if value in A4 is selceted from combo box I want
B4 to show in text box and so on...
 
T

Tom Ogilvy

Private Sub Combobox1_Click()
Dim Range2 as Range
set Range2 = Range1.Offset(0,1)
Textbox1.Text = Range2(Combobox1.ListIndex+1)
End Sub
 

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

Top