+ Reply to Thread
Results 1 to 7 of 7

Macro to display images

  1. #1
    Registered User
    Join Date
    05-24-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    2

    Macro to display images

    Hello all,

    I have a product comparison type worksheet, and would like the corresponding product image to display when the user either clicks a button or chooses the product from a drop down menu (i haven't decided which i prefer yet). Its likely the excel file will be sent to lots of people, so i need the images linked to the worksheet (or another 'picture only' worksheet) itself, rather then locally on my hard drive.

    Can anyone help me out?

    Thanks in Advance,
    Paul

  2. #2
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Macro to display images

    Here is something to review. Use the DV pull-down in cell C11:
    Attached Files Attached Files
    Gary's Student

  3. #3
    Registered User
    Join Date
    05-24-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Macro to display images

    Hello Jakob,

    This is really great, its exactly what i was after!
    I appreciate you taking the time out to make it.

    JUST a few questions...

    - There seems to be a hideall type function, that makes ALL images on the sheet invisible.
    There are actually 2 images on there (logos), that i permanently want to keep visible.
    Is there a way to do that?

    - Also, how did you manage to get the pull down menu to be within the cells size, no matter how big or small you make it?
    Im only able to make one that sits 'on top' of other cells.

    Thanks again

  4. #4
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Macro to display images

    1. Update the HideAll macro to "re-visible-ize" your two logos after making all pics invisible
    2. make the pull-down cell "wide enough"

  5. #5
    Registered User
    Join Date
    05-26-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Macro to display images

    This code is a great start for my purposes, except that how/where do I add my own photos into the sheet? (I'm Sorry, I cant find were the pictures of the cat etc are placed in the spreadsheet file).
    I inserted my own image, updated the DV, added a line for my own image, and got a 'item with specified Name' Error.
    Is it possible to have one image that is put into multiple places throughout a spreadsheet file?

  6. #6
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Macro to display images

    For demo purposes, I just copied sample pictures from Google Images and pasted then in the same general area of the worksheet. I then assigned each Picture a specific Name so the VBA code could refer to them.

  7. #7
    Registered User
    Join Date
    05-26-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    2

    Thumbs up Re: Macro to display images

    Thanks Jakobshavn. I had a macro that hid all images. when I 'commented' it out the images all appeared.
    thank you for your help and super quick reply. greatly appreciated.

+ 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