I am pasting shapes to a specific cell range. However, I first want to find out if there is already a shape in (on top) the cell range. If there is already a shape, I need to identify it and delete it so I can paste a new shape there. IF there is no shape located in the range, then to go ahead and past a shape there.
For example,
Sheets(Sheet1).Range("A1") is where I am pasting shapes.
I want to first identify if there is already a picture located at Range("A1"). If there is, delete it, and then paste the new picture.
I am using the following code to paste the new shape:
Using Excel 2007
For example,
Sheets(Sheet1).Range("A1") is where I am pasting shapes.
I want to first identify if there is already a picture located at Range("A1"). If there is, delete it, and then paste the new picture.
I am using the following code to paste the new shape:
Code:
Highlight_Left_Ref = Worksheets("Client Report").Range("HighlightRef").Left - 5.25
Highlight_Top_Ref = Worksheets("Client Report").Range("HighlightRef").Top - 3
Sheets("StateHighlights").Select
Sheets("StateHighlights").Shapes("52One").Copy
Application.Goto Sheets("Client Report").Range("HighlightRef")
ActiveSheet.Paste
Sheets("Client Report").Shapes("52One").Left = Highlight_Left_Ref
Sheets("Client Report").Shapes("52One").Top = Highlight_Top_Ref