Inserting Multiple Pictures Into Set Destination Cells

dpearson15

New Member
Joined
Sep 12, 2006
Messages
6
Greetings,
I'm using a template to report on progress at a construction site. The format is a photo with a comment, with a total of 24 photos to each worksheet. I've inserted the photos, which I now need to move to set cells within the sheet. The first inserted photo will always be moved to cell A5, the second photo inserted to cell A25, etc., regardless of which set of 24 photos are inserted. Is there any way to set up a macro that will automatically move the photos from the point of insert to the correct destination cells? That way I don't have to move the photos manually each time.
Thanks!
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Hi Diane
Welcome to the board

This code places the top left of the pictures in the top left of A5. A25, A45, etc.

Please try:
Code:
Sub PlacePictures()
Dim shp As Shape, lRow As Long

lRow = 5
With Worksheets("Sheet1")
    For Each shp In .Shapes
        shp.Left = .Range("A" & lRow).Left
        shp.Top = .Range("A" & lRow).Top
        lRow = lRow + 20
    Next shp
End With

End Sub

Hope this helps
PGC
 
Upvote 0
Worked Like a Charm!

This is exactly what I needed. My problem is solved & my time is saved. Thanks so much!
 
Upvote 0

Forum statistics

Threads
1,215,417
Messages
6,124,791
Members
449,188
Latest member
Hoffk036

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