Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: Combo Boxes and Graphics

  1. #1
    New Member
    Join Date
    Apr 2002
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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-

  2. #2
    MrExcel MVP Damon Ostrander's Avatar
    Join Date
    Feb 2002
    Location
    Denver, Colorado USA
    Posts
    4,239
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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

  3. #3
    Board Regular
    Join Date
    Mar 2002
    Location
    Fort McMurray, AB
    Posts
    218
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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!
    Regards, Duane
    Office2010 in Win7

  4. #4
    New Member
    Join Date
    Apr 2002
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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!!

  5. #5
    MrExcel MVP Damon Ostrander's Avatar
    Join Date
    Feb 2002
    Location
    Denver, Colorado USA
    Posts
    4,239
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •