+ Reply to Thread
Results 1 to 32 of 32

linking pictures to a drop down link

  1. #1
    Registered User
    Join Date
    02-16-2008
    Posts
    23

    linking pictures to a drop down link

    hi guys

    can someone help me please im tearing my hair out

    ive done some data validation and created a drop down list but what im trying to do is

    once i have selected what i want from the drop down list i would like a picture to appear next to it automatically

    ie
    if i select kettle it will show a pic of a kettle

    is there anyone who would be kind enough to talk me through this in the easiest terms possible


    it would be very gratefully appreciated

    thanks
    exceldonk

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    See if one of these links help

    http://www.andypope.info/fun/picviewer.htm

    http://www.mcgimpsey.com/excel/lookuppics.html

    Insert Pictures from Folder

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    02-16-2008
    Posts
    23
    cheers noob
    thats exactly what i want but cant undertsnad it

    thanks anyway

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    linking pictures to a drop down link

    If you want to avoid the VBA programming approach, try this:

    Assumption: Pictures are stored on Sheet2 and will be dynamically shown on Sheet1.

    Please Login or Register  to view this content.
    Does that help?
    Post back if you have more questions.
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  5. #5
    Registered User
    Join Date
    02-16-2008
    Posts
    23
    cheers for your help guys but i think this is beyond me despite the help youve given me

    thanks anyway
    donk

  6. #6
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Post a sample file and someone will take a look

    VBA Noob

  7. #7
    Registered User
    Join Date
    02-16-2008
    Posts
    23
    hey ron
    sorry to trouble you but i dont suppose you would be kind enough to do a small mock up as an attahcment?
    i woul dbe able to do it from there i think

    dont worry if ya too busy though
    many thanks

  8. #8
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988

  9. #9
    Registered User
    Join Date
    02-16-2008
    Posts
    23
    hey noob thanks
    that is exxactly what i want but when i mess around with it and try and add pictures it doesnt do anything and yes ive changed the validation list
    what am i doing wrong please

    many many thanks for your help on such a hopeless person

  10. #10
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    It's all there for you

    Have a play with it. Look at the named ranges

    http://www.contextures.com/xlNames01.html

    VBA Noob

  11. #11
    Registered User
    Join Date
    02-16-2008
    Posts
    23
    ive played and played till i dropped and i cant quite see it
    im missing something very basic but thats me all over

    thanks anyway

  12. #12
    Registered User
    Join Date
    02-16-2008
    Posts
    23
    hi noob
    ive tried everything and followed the "rules"
    and im only trying one pic
    im using the one you did and following the steps with one picture what am i doing wrong

  13. #13
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Start your own version and post what you got so we can see where your going wrong.

    BTW the simpliest one in my view is this one

    http://www.mcgimpsey.com/excel/lookuppics.html

    VBA Noob

  14. #14
    Registered User
    Join Date
    02-16-2008
    Posts
    23
    hi noob
    i have attached what i have tried to do so maybe you can pin point what im doing wrong from that
    many many thanks

    http://www.savefile.com/projects/808612230

  15. #15
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    linking pictures to a drop down link

    Hi, Exceldonk

    Try this:

    The picMiko Range Name should have these settings:

    Names in Workbook: picMiko
    Refers to: =Sheet2!$B$41:$E$56

    instead of Refers to: =INDIRECT("Pic"&Sheet1!$A$1)

    Does that fix your issue?

  16. #16
    Registered User
    Join Date
    02-16-2008
    Posts
    23
    ah jeez

    thats blooming marvelous

    thanks so very much you guys something so simple

    really really appreciate it

    thanks again

  17. #17
    Registered User
    Join Date
    02-16-2008
    Posts
    23
    the only thing that i would like to ask is that if cell a1 is empty can it be that there is no picture there?

    thanks

  18. #18
    Registered User
    Join Date
    02-16-2008
    Posts
    23
    hi ron
    id also like to know why the pictures ive done arent the same size as i have made them all the same size

    see here

    youre a star thanks

    http://www.savefile.com/files/1417433

  19. #19
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    linking pictures to a drop down link

    Try this...

    <Insert><Name><Define>
    Names in Workbook: Pic
    Refers to: =Sheet2!$A$1

    Now...when there is nothing selected.....the Pic picture displays
    ...which is a picture of an empty cell.

    Some other tips:
    If you set the display pictures size properties to:
    Check: Relative to original picture size
    and set the Height and Width to 100%

    Then the pictures will display at the size on Sheet2.
    Just remember to size the originals properly and adjust the
    range names so the new pic cells are included.

    Does that help?

  20. #20
    Registered User
    Join Date
    02-16-2008
    Posts
    23
    its ok sorted the size thing its the define name and area source

    im getting good at this hee hee

    thanks for your help

  21. #21
    Registered User
    Join Date
    02-16-2008
    Posts
    23
    hi ron

    sorry to trouble you again
    but is there any way i can have a blank picture it the drop down menu is blank??
    id like it to be this way if possible please

    regards
    and thanks again
    donk

  22. #22
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    This example may be better

    http://www.excelforum.com/showthread.php?t=636019

    VBA Noob

  23. #23
    Registered User
    Join Date
    02-16-2008
    Posts
    23
    but i have got everything set up the other way

    all i want is to leave the cell blank and there be nothing in the picture cell

    regards

  24. #24
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Turn off gridlines on both sheets. Name an area in Sheet2 called just Pic as before then when A1 is blank it appears blank

    HTH

    VBA Noob

  25. #25
    Registered User
    Join Date
    09-26-2011
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: linking pictures to a drop down link

    All,

    I'm not smart enough to know whether or not you might have answered this question but if you haven't here it is:

    I'm trying to create a three column list in excel that can be searched and will keep people attached to their picture when searching for them. Essentially I want to have a column for their "Picture", a column for their "Name", and a column for their "Department". Then I want to be able to use the "A-->Z Sort" function to be able to sort by name or department and have the pictures follow allong with the names. The problem is that however I have it set up, the pictures never move. I've tried linking them to certain cells but that only ensures they stay in that cell. I can't seem to find a solution to this problem. If someone has already solved this problem please point me in the right direction to where it's already been solved. Otherwise, does anyone know how to do this? If so I would be deeply indebted! Thanks for your help!

    Eric

  26. #26
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: linking pictures to a drop down link

    Eric, welcome to the forum. However,

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread.

  27. #27
    Registered User
    Join Date
    03-27-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: linking pictures to a drop down link

    I was able to create the link pictures to a drop down list following the Ron's instructions. Cool trick

    However, when I went back and added new pic[name], the ShowMyPic does not bring in the new images.

    The range names for all the new images match the originals so I don't understand why the new images are not captured. Is there an additional step required when modifying the original pictures in Sheet2?

  28. #28
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,572

    Re: linking pictures to a drop down link

    @philips_cody:
    Your post does not comply with the forum rules:
    #2. Don't post a question in the thread of another member -- start your own. If you feel it's particularly relevant, provide a link to the other thread.
    Ben Van Johnson

  29. #29
    Registered User
    Join Date
    09-16-2013
    Location
    Texas, US
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: linking pictures to a drop down link

    Hi Ron,

    This looks like exactly what I want to do, but I don't understand some of your instructions. Are you using Excel 2010? Could you please explain these steps in a bit more detail?

    Thanks!

  30. #30
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: linking pictures to a drop down link

    adamsmith, hi and welcome to the forum

    Please read post #26...
    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  31. #31
    Registered User
    Join Date
    11-26-2010
    Location
    manchester
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: linking pictures to a drop down link

    Quote Originally Posted by Ron Coderre View Post
    If you want to avoid the VBA programming approach, try this:

    Assumption: Pictures are stored on Sheet2 and will be dynamically shown on Sheet1.

    Please Login or Register  to view this content.
    Does that help?
    Post back if you have more questions.
    Hi

    Would you know why this does not seem to be working in ms2010 (reference is not valid)?

    thanks

    seb

  32. #32
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: linking pictures to a drop down link

    That approach has worked since Excel5. The problem is most likely with referenced ranges or the defined names.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1