Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deleting logo objects where object name is not known

Status
Not open for further replies.

VBAjedi

Programmer
Dec 12, 2002
1,197
KH
My project dynamically generates payment coupons - one for each billing period on a master invoice. The method I'm using is a cut-and-paste loop to copy the first coupon x number of times down the sheet. The logo graphic is copied correctly with the cells, but when I go to reset the sheet (using the "Range(RangeRef).Clear" method) the logos are not deleted. Because they were created with a paste operation, I don't know their name and cannot delete them by name.

How can I delete all logos on the sheet except the first one, when I only know the name of the first logo object?

This is my first posting, so thanks in advance for your help!
 
This would probably work:

for i=activesheet.shapes.count to 2 step -1
activesheet.shapes(i).delete
next i

Rob
[flowerface]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top