Look up the result of a previous combobox

crinkle

New Member
Joined
Feb 16, 2006
Messages
32
Hi
I have a user form with various combo boxes each showing the result of the previous combo box selection, what I am trying to do is show (look up from my data) the description of a product that has just been selected in the last combo box is this possible? Also (I maybe asking the impossible here!) in my data I have a file path to the image that is associated to that product, will it be possible to display the image on the user form of the product that has been selected as well as the description? All my images are all together in 1 folder on my computer. If someone has any ideas I would love to hear them.
Thanks
Chris
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
Say your ComboBox uses a list of products from A1:A10 and the product descriptions are in B1:B10. This will put the description in TextBox1:

Code:
Private Sub ComboBox1_Change()
    TextBox1.Text = Worksheets("Sheet1").Cells(ComboBox1.ListIndex + 1, 2).Value
End Sub

You can use LoadPicture to change the picture in an Inage control:

http://www.mrexcel.com/board2/viewtopic.php?t=227166
 

crinkle

New Member
Joined
Feb 16, 2006
Messages
32
Hi tried this and it only worked to a degree, my combo boxes work from named ranges as there is so much product and combinations this will only give me the descriptions of the first range on the work sheet. I need it to look up the description for any result in the last combo box from any named range i select, is there anyway of doing the last suggestion but look within named ranges? if that makes any sense.
Thanks
Chris
 

Watch MrExcel Video

Forum statistics

Threads
1,129,809
Messages
5,638,482
Members
417,027
Latest member
wlknspc7

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
Top