+ Reply to Thread
Results 1 to 6 of 6

Insert multiple pictures from specific cell values in specific cells

  1. #1
    Registered User
    Join Date
    01-10-2018
    Location
    rga
    MS-Off Ver
    aeg
    Posts
    3

    Red face Insert multiple pictures from specific cell values in specific cells

    I don't have much knowledge about VBA, but I'm leaning. I hope someone can help me.

    I found this code on the internet (from Computergaga). The code basically inserts a picture from a directory into a specific cell in Excel.
    But the code does this only for one cell. I want to expand the code so that it can be used on multiple cells, for example: B2:B10.
    So when a value is added to B2 it shows the corresponding picture in D2 and for B3 in D3... etc.

    I would be very grateful if somebody could help me


    Please Login or Register  to view this content.

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,201

    Re: Insert multiple pictures from specific cell values in specific cells

    Hi jenskies
    Try this...
    Please Login or Register  to view this content.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Registered User
    Join Date
    01-10-2018
    Location
    rga
    MS-Off Ver
    aeg
    Posts
    3

    Re: Insert multiple pictures from specific cell values in specific cells

    Sir, you are a hero!

    It took me a few hours to understand the changes you made, but I understand them now.

    I will mark the thread as solved and I added reputation!
    Last edited by Jenskies; 01-12-2018 at 01:58 PM.

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,201

    Re: Insert multiple pictures from specific cell values in specific cells

    tx... glad i could help

  5. #5
    Registered User
    Join Date
    01-10-2018
    Location
    rga
    MS-Off Ver
    aeg
    Posts
    3

    Re: Insert multiple pictures from specific cell values in specific cells

    Ok, I still have one problem. At first, I thought it wasn't really a problem, but the script never deletes a file. So when I change the values a lot of times... the file gets unnecessarily big. In my first code, I used "ActiveSheet.Pictures.Delete"... But this deletes all pictures on the sheet, right? I tried clearcontents... but this doesn't delete picture... Is there a way to replace the image when I change the value....

    The scripts works, but it would be awesome if there is a way to really replace the image. Thanks in advance!

  6. #6
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,201

    Re: Insert multiple pictures from specific cell values in specific cells

    Please upload a sample file that we can make use of and explain in detail what you would like to achieve.

+ 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] If a cell contains text insert specific text in specific cells in row
    By muss1210 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-18-2017, 10:51 AM
  2. Replies: 1
    Last Post: 03-14-2014, 06:52 PM
  3. Replies: 3
    Last Post: 07-12-2013, 09:17 AM
  4. [SOLVED] Macro to generate a random number between 2 specific values into specific cells.
    By Nerfmagnet in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-10-2013, 11:45 AM
  5. Replies: 6
    Last Post: 04-08-2013, 05:12 PM
  6. Replies: 3
    Last Post: 03-28-2011, 10:53 AM
  7. Replies: 2
    Last Post: 08-13-2009, 04:26 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