Userform ComboBox 'Vlookup'

johnpants

New Member
Joined
Oct 31, 2005
Messages
44
Hello, I have a Userform with a populated combobox (combobox4), what I want to to is if someone selects something from the combobox, it checks a range and enters a specific cell into a textbox (textbox12).

At the minute the range I want it to check is HH10:HI85, the details for the combobox are in HI column, and the details I want it to enter into the textbox are in HH.

Is this possible? Any help would be much appreciated as my boss is on my back to get this last bit done today..

Thanks,

john.
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
I have assigned this to a button although the Private Sub ComboBox4_Change() event would do just as well :-
Code:
Private Sub CommandButton1_Click()
    TextBox14.Value = _
        Application.WorksheetFunction.VLookup _
        (ComboBox4.Value, Range("hh10:hi85"), 2, False)
End Sub
 
Upvote 0
Thank you very much Brian, that's what I am looking for, but it is falling over and bringing up error: 'Unable to get the vlookup property of the worksheet function class'

I'm gonna fiddle with it and see if I can figure it out, any ideas why this would happen? Could it be because the worksheet is protected at all?

Thanks again.
 
Upvote 0

Forum statistics

Threads
1,214,652
Messages
6,120,746
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top