I have a payment receipt template that inserts a picture of a stamp "Paid in Full" when a payment is applied.
I recorded a Macro to delete that picture, but every time the code inserts the picture it gives it a new name (Picture 48, next time the picture is inserted it is Picture 49....).
How can this code be modified to delete the picture no mater what the name is? The original picture name is "paid_in_full-stamp.png".
Here are both of my codes...
Sub PaidInFull() Range("N22").Select ActiveSheet.Pictures.Insert("C:\Users\Sarah\Desktop\NewProgram\paid-in-full-stamp.png").Select Selection.ShapeRange.ScaleWidth 0.5832988513, msoFalse, msoScaleFromBottomRight Selection.ShapeRange.ScaleHeight 0.5832988901, msoFalse, msoScaleFromBottomRight Selection.ShapeRange.IncrementLeft -1000 Selection.ShapeRange.IncrementTop -200 Range("N22").Select End Sub Sub Macro7() ActiveSheet.Shapes.Range(Array("Picture 48")).Select Selection.Delete End Sub