+ Reply to Thread
Results 1 to 10 of 10

Inserting multiple pictures

  1. #1
    Registered User
    Join Date
    02-19-2009
    Location
    VA
    MS-Off Ver
    Excel 2003
    Posts
    10

    Inserting multiple pictures

    Excel 2000

    I am having some trouble with the vba code I'm using to reference pictures. Now please bear with me, I'm don't know vba whatsoever and am copy/pasting what I found on the internet.

    The spreadsheet in question is attached....

    The issue:
    I am trying to show a picture based on the inputs in the cells above. Basically the picture in cell A28 is referenced by the information in cell AI7. The picture in cell D28 should be referenced by the information in cell AI8 and so on.

    The problem is that when I enter the code to insert multiple pictures, it comes up with errors.

    I'm hoping this is just my lack of programming knowledge and this is an easy fix. Please tell me where I am going wrong.


    Also, will there be an issue if I reference the same picture multiple times?


    Any and all help is greatly appreciated.
    Attached Files Attached Files
    Last edited by fourwhls; 03-20-2009 at 10:48 AM.

  2. #2
    Registered User
    Join Date
    02-19-2009
    Location
    VA
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Inserting multiple pictures

    I'm still looking for some help!!

    I found a thread that should solve my issue, but I can't get it to work. Here's a link to that thread: http://www.excelforum.com/excel-prog...-pictures.html

  3. #3
    Registered User
    Join Date
    02-19-2009
    Location
    VA
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Inserting multiple pictures

    Should I assume that nobody is able to help?

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Inserting multiple pictures

    This will not get around the problem of having to display the same picture in 2 places but it will display the pictures for both test cells if unique.

    One of your problems is that you created 2 calculate events. Instead what you need to do if place both sets of code in the 1 event.

    This checks A28 and D28 content. Making the picture visible and placed correctly if the name matches

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  5. #5
    Registered User
    Join Date
    02-19-2009
    Location
    VA
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Inserting multiple pictures

    Andy,
    I appreciate the reply, but unfortunately I am still not able to move forward. I need to be able to display the same picture multiple times.

    Is it possible to use some version of the code that your wrote here?: http://www.excelforum.com/excel-prog...-pictures.html

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Inserting multiple pictures

    This code in a standard code module.

    Please Login or Register  to view this content.
    This revised Calculate event code
    Please Login or Register  to view this content.
    Obviously you need to add and name pictures for all shaft arrangements
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    02-19-2009
    Location
    VA
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Inserting multiple pictures

    Andy,
    You are my hero! If you are ever on this side of the pond...beer is on me.

    Thanks,
    Shawn

  8. #8
    Registered User
    Join Date
    06-16-2010
    Location
    Germany
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Inserting multiple pictures

    This is in regards to the link below.

    http://www.excelforum.com/excel-prog...-pictures.html

    In the attachment I do not understand where are the photo's coming from ? Please help

    Regards,
    Mahipal

  9. #9
    Registered User
    Join Date
    02-19-2009
    Location
    VA
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Inserting multiple pictures

    Quote Originally Posted by smartty4all View Post
    This is in regards to the link below.

    http://www.excelforum.com/excel-prog...-pictures.html

    In the attachment I do not understand where are the photo's coming from ? Please help

    Regards,
    Mahipal
    Mahipal,
    There is only one pictured referenced in the spreadsheet attached to the original post. The pictures can be physically placed anywhere within the spreadsheet.

    I have attached the final spreadsheet. Look at the REF tab (which is hidden) and you will find all the referenced pictures.

    Hope this helps
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    05-24-2011
    Location
    Hoboken, NJ
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Inserting multiple pictures

    Andy,

    I have used your code at the top of the page (the shorter one) to lookup multiple pictures. It works great. However I have one question, is there a way to have the picture centered in the cell? I am not an expert on VBA, but by looking at your code, it looks like its moving the picture to the TOP and LEFT of the cell. I tried to change the words to Center, but that didn't work. Is there a solution to this? Thank you.

+ 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