Macro to put pictures in shapes

Xx7

Board Regular
Joined
Jan 29, 2011
Messages
126
I have a folder of pictures. I would like to run a macro that creates a rectangle shape (see below) in every cell A1, A2... A100 for every picture. I would like to have each picture display in the background of their respective rectangle. Also, I would like to create a hyperlink to the shapes... so I can click on their rectangles and they will appear.

Any help appreciated!! :)



Here is some useful code to anchor the shapes to the cells:
Code:
 Sub Rectangle()

    
    With Range("b4")
        ActiveSheet.Shapes.AddShape _
                Type:=msoShapeRectangle, _
                Left:=.Left, _
                Top:=.Top, _
                Width:=.Width, _
                Height:=.Height


End With


 End Sub
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

Forum statistics

Threads
1,213,536
Messages
6,114,202
Members
448,554
Latest member
Gleisner2

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