Announcement

Collapse
No announcement yet.

Excel - macros: inserting an image (from jpg file)

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Excel - macros: inserting an image (from jpg file)

    Hi,

    I'm looking for a way to automatically insert an image into the Excel sheet, depending on a filename which is entered in a different cell.

    For example, let's say that in cell A1 I type "ABCD" - I want Excel to insert the picture "ABCD.jpg" into cell B1. If I replace the text in A1, it replaces the image in B1 accordingly... etc.

    Would be extremely thankful to anyone who could help - especially if you could show me how to do this with a relative pathname for the image (i.e., the images will be located in a sub-folder inside the folder where the Excel sheet is located).

    Thanks!

  • #2
    Re: Excel - macros: inserting an image (from jpg file)

    Did you ?

    This should get you started:
    http://www.exceltip.com/st/Insert_pi...Excel/486.html
    Tom Jones
    MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
    PhD, MSc, FIAP, MIITT
    IT Trainer / Consultant
    Ossian Ltd
    Scotland

    ** Remember to give credit where credit is due and leave reputation points where appropriate **

    Comment


    • #3
      Re: Excel - macros: inserting an image (from jpg file)

      Yes - I've googled and actually managed to come up with a macro that works almost exactly like I want it to

      "Almost" because - well, it's still a macro that has to be executed (with a key combination). I want to find a way to make it execute automatically whenever the data ( = filename) in the other cell is changed - much like a formula would work; the picture would pop up as soon as the cell data is entered or changed.

      Any ideas?

      thanks!

      Comment


      • #4
        Re: Excel - macros: inserting an image (from jpg file)

        Nevermind - problem solved

        I used the worksheet's "Change" event to detect changes in the cell range and execute the code to insert the picture.

        Comment

        Working...
        X