Combo Boxes and Graphics

Dorothy Lane

New Member
Joined
Apr 1, 2002
Messages
2
I'm a little over my head but I'm hoping someone can tell me whether this is possible. I have a pull down menu that I would like to link a graphic depending on the users selection. Can this be done and if so how?
Thanks-
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Hi Dorothy,

Yes, it can be done. But I can't provide instructions without knowing a bit more. You didn't mention where or what your pulldown menu is. Is it a combobox on a custom userform? Or perhaps a custom menu you have added to one of the Excel toolbars? And what do you mean by "link"? Do you want it to appear someplace when an associated item in the pulldown is selected, and if so, where?
some clarification would be helpful.

Damon
 
Upvote 0
Damon is right, we'll need some more info in order to have an idea in what direction to go.

For example, you might want a combobox to allow a user to select from a list of, say, names, and then, depending on which name is selected, a cell will say "attended" or "did not attend". The combobox would use the output cell which would be the value a vlookup used to return the status of the name. As the combobox selection changes, the name changes, the output cell number changes and the vlookup returns the appropriate data.

Or, you could be looking for something totally different. Help us help you!
 
Upvote 0
Yes I am using a custom combo box on a user form. There are 5 catagories with several selections that the user can select and I would like to have a graphic appear based on their selection. I have used vlookup for a number to appear but I was not sure if you can use it for a graphic. Your help will be greatly appreciated!!
 
Upvote 0
Hi again Dorothy,

You still forgot to mention WHERE you wanted the picture to appear. I will assume you want it to appear right on the form itself. You can do this via the Image ActiveX control. This control in on the Controls toolbar in the lower-right corner. To display a picture using this control, set the Picture property to the bitmap picture file like this:

Image1.Picture = LoadPicture("C:MyPic.jpg")

If you want to look this picture up in a table (and yes, you can use VLOOKUP or HLOOKUP) you just need to put the string that is the pathname into the table and use your lookup to find the file name and plug it in as the LoadPicture argument above. It is a bit tedious to explain here, but if you want an example, give me a little more explanation of how you want the lookup to work (e.g., do you want to assign a name to each picture, such as "3-carat ruby" and when the user selects this name from a listbox on the userform the picture appears?), and your email address, and I will try to send you a simple example.

Happy computing.

Damon
 
Upvote 0

Forum statistics

Threads
1,213,543
Messages
6,114,240
Members
448,555
Latest member
RobertJones1986

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