+ Reply to Thread
Results 1 to 7 of 7

Macro to pull multiple images from folder to multiple sheets by image/sheet name

  1. #1
    Registered User
    Join Date
    07-10-2020
    Location
    London, England
    MS-Off Ver
    office 365 Pro plus
    Posts
    6

    Macro to pull multiple images from folder to multiple sheets by image/sheet name

    Hi and thanks for having me here!

    Unfortunately a series of google and forum searches hasn't been fruitful this time so below is my issue:


    I have a workbook that contains 230 sheets which are essentially forms that are pulling data from the first master sheet. Each sheet is named after a specific reference number.
    Now, I also have a folder that contains pictures that are named after the relevant reference number as well.

    I want to create a macro that will pull the relevant picture to the corresponding sheet. The macro can either read the sheet name or a cell inside each sheet (the ref no can be found inside the sheet too) to determine which photo to pull.

    All pictures are/will be resized to the exact dimension I need them to be and the cell will be exactly the same in every sheet.

    I have run into multiple problems, so I believe it's better not to bother you with what I have done so far.


    Thanks for any help in advance guys!
    Last edited by MrSTruct; 07-13-2020 at 10:35 AM. Reason: Solved

  2. #2
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,513

    Re: Macro to pull multiple images from folder to multiple sheets by image/sheet name

    On both, change references (Folder Name, Extension, Left, Top etc) where required.
    First macro is for same extension type files. In this case .jpg. Change to whatever is required.
    Second macro is for different extension types (jpg, jpeg, bmp etc).
    The folder cannot have non picture files in it.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-10-2020
    Location
    London, England
    MS-Off Ver
    office 365 Pro plus
    Posts
    6

    Re: Macro to pull multiple images from folder to multiple sheets by image/sheet name

    That worked great thanks!!

    I used the first macro and played around with Left and Top Values to have it bring them where I want it to.
    Could we slightly change that to ask it to insert it in a specific cell and resize/stretch it to fit inside it? That is going to be a big merged cell though.

    In any case I think I can work as it is right now and get my task done.

    Thanks so much

  4. #4
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,513

    Re: Macro to pull multiple images from folder to multiple sheets by image/sheet name

    I'll have a look at it later when I have some more time but you can use
    Please Login or Register  to view this content.
    or similar.

    As for Merged cells, google something like:
    "Why not use merged cells in Excel"

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,288

    Re: Macro to pull multiple images from folder to multiple sheets by image/sheet name

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important.

    (Note: this requirement is not optional. As you are new I will provide the link for you this time: https://www.mrexcel.com/board/thread...-name.1139704/)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  6. #6
    Registered User
    Join Date
    07-10-2020
    Location
    London, England
    MS-Off Ver
    office 365 Pro plus
    Posts
    6

    Re: Macro to pull multiple images from folder to multiple sheets by image/sheet name

    Quote Originally Posted by AliGW View Post
    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.
    I'm sorry for that, I am trying to edit my original post to add the link but am not allowed to add links. Thanks for your tolerance and for providing the link for me.

    Quote Originally Posted by jolivanes View Post
    I'll have a look at it later when I have some more time but you can use
    Please Login or Register  to view this content.
    or similar.

    As for Merged cells, google something like:
    "Why not use merged cells in Excel"
    Again, thanks so much.

  7. #7
    Registered User
    Join Date
    08-15-2022
    Location
    Kuwait
    MS-Off Ver
    Microsoft 365
    Posts
    1

    Re: Macro to pull multiple images from folder to multiple sheets by image/sheet name

    Hi,
    i'm getting an error , application-defined or object defined error (Run time error '1004') , please support

+ 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] Export Images From Multiple Sheet Into a Folder
    By Jhon Mustofa in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 07-02-2020, 11:33 AM
  2. VBA Multiple image insert MACRO from file folder.
    By mattj6945 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 09-13-2019, 06:55 AM
  3. Replies: 3
    Last Post: 05-11-2017, 01:57 PM
  4. [SOLVED] Need a macro to show multiple images on a sheet based on the name of the image file
    By Nirmall in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-29-2015, 11:20 AM
  5. Macro Code to pull multiple images from the list of item number in colmn A
    By tantcu in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-20-2015, 03:56 PM
  6. 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

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