+ Reply to Thread
Results 1 to 8 of 8

Insert multiple images into excel work sheet by name

  1. #1
    Registered User
    Join Date
    08-02-2013
    Location
    australia
    MS-Off Ver
    Excel 2003
    Posts
    14

    Insert multiple images into excel work sheet by name

    Hello Experts
    Hope I am in the correct forum section here
    I have a work sheet that has in column B a list of .jpg image names (From B1 to B100)
    These images are stored at C:\Users\Rob\Pictures
    I want to insert the images into Column A alongside the matching name in column B

    I have searched google and found many examples of code to do this but with my very limited code knowledge have been unable to modify it with my specific criteria and make any of them work for me.

    What I would like from some very helpful person out there is the code exactly as I would need to write it.
    That is with my exact information detailed above
    Much appreciated if somebody would take the time to do this for me

    Rob

  2. #2
    Valued Forum Contributor spitfireblue's Avatar
    Join Date
    01-29-2015
    Location
    Adelaide, Australia
    MS-Off Ver
    2007,2010,2016
    Posts
    611

    Re: Insert multiple images into excel work sheet by name

    Try this:

    Please Login or Register  to view this content.
    Regards,
    Stephen

    If you feel someone has helped you please thank them and click on the star on their post to add reputation.
    Please ensure that you use code tags where relevant, and mark solved threads as solved.
    Most of all please be respectful and understanding of others.

  3. #3
    Registered User
    Join Date
    08-02-2013
    Location
    australia
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Insert multiple images into excel work sheet by name

    Thanks very much Steven I will try it

  4. #4
    Registered User
    Join Date
    08-02-2013
    Location
    australia
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Insert multiple images into excel work sheet by name

    Hi Steven
    Sorry to bother you
    Remember my code knowledge is almost zero

    It didn't work for me
    Did I need to add anything at all to that code you supplied ?

    Rob

  5. #5
    Forum Expert
    Join Date
    04-01-2013
    Location
    East Auckland
    MS-Off Ver
    Excel 365
    Posts
    1,343

    Re: Insert multiple images into excel work sheet by name

    Did it do anything?

    maybe it is just erroring on one of the lines because it doesn't have a valid name.
    try the below.

    Otherwise you might want to click 'go advanced" and "manage attachments" and show us.

    Please Login or Register  to view this content.

  6. #6
    Valued Forum Contributor spitfireblue's Avatar
    Join Date
    01-29-2015
    Location
    Adelaide, Australia
    MS-Off Ver
    2007,2010,2016
    Posts
    611

    Re: Insert multiple images into excel work sheet by name

    scottiex is right, some of the names that you have in column B might not match the files so it is causing an error.
    By adding "On Error Resume Next" the loop will continue until it goes through all 100 cells.
    If your image names in column B have .jpg against each of them then remove & ".jpg" from the code as well

  7. #7
    Registered User
    Join Date
    08-02-2013
    Location
    australia
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Insert multiple images into excel work sheet by name

    Thanks scottie and steven
    Tried again and nothing happens
    I run the macro but pictures do not appear
    I did a really simple worksheet with only 6 image names in column B (B1 to B6)
    Even moved the images (6 of them) to another location C:\testmacro
    Altered the code to accommodate them two changes but still nothing
    Made sure macros are enabled as well
    I right click the tab and view code and this is where i paste the code then run macro
    I must be doing something wrong

  8. #8
    Registered User
    Join Date
    08-02-2013
    Location
    australia
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Insert multiple images into excel work sheet by name

    Thanks again to Steven and Scottie
    4.00 am in bed this morning I realized again why I am a complete Turkey Novice at this code stuff.
    Your brilliant codes work perfectly I just had to realize I needed to highlight the cells before running the macro (Goose)
    So problem solved on excel forum once again

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Insert multiple images into excel across two columns
    By Natstin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-09-2015, 11:02 PM
  2. Macro to Insert Multiple Images to Multiple Sheet of a Excel Workbook.
    By Nimalan_Dude in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-07-2014, 11:18 PM
  3. Need to Insert and save multiple images in excel
    By vasu.meesala in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-25-2014, 02:10 PM
  4. Replies: 0
    Last Post: 07-02-2014, 03:04 PM
  5. Insert Multiple Images to excel sheet
    By celtic king in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-10-2014, 04:13 PM
  6. Insert multiple images from file in excel
    By meperson in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 12-04-2012, 03:29 PM
  7. Insert and Sort Multiple Images into Excel
    By plasma33 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-21-2012, 11:07 PM

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