Change picture on sheet with a link

cdill

New Member
Joined
Jul 10, 2017
Messages
29
I am rebuilding several sheets of a document that have multiple pictures saved. The pictures are labeled Image01, Image02, Image03, etc. up to Image24.
I am looking to run a macro that will automatically change these pictures. They need to link to images already on my computer.

I've seen lots of options that will delete a shape and create an entirely new shape or create a new shape with a link but not just change the picture to a linked picture.

I do not want to embed an image or create a new image. I just want to change the images already existing on the page.

Cell A1 will display the page number, so Sheet01 will say "01". All pictures on this page will be in folder
C:\TRD Database\Photos\Page01
Image01 will be the file "C:\TRD Database\Photos\Page01\Image01.jpg"

Is there a way that I can run a code that will say basically do the below actions (using the number in Cell A1 to complete the address:
VBA Code:
On Active Sheet
With Image01
Change Picture - Link to C:\TRD Database\Photos\Page (Cell A1)\Image01.jpg
With Image02
Change Picture - Link to C:\TRD Database\Photos\Page (Cell A1)\Image02.jpg
etc.

I know this is not VBA code, but I'm not sure how exactly to phrase this.

Thank you.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Forum statistics

Threads
1,215,083
Messages
6,123,020
Members
449,092
Latest member
ikke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top