Serving the Quantitative Finance Community

 
User avatar
poochie
Topic Author
Posts: 0
Joined: May 20th, 2004, 4:36 am

Deleting a picture from Excel using VBA

May 12th, 2005, 3:35 pm

I have this excel sheet where I paste a lot of stuff including pictures. I want to write a "clean-up"macro for a selected range of that spreadsheet.So, I write something like:Range("CleanUp_Area").SelectSelection.clearContentsThis clears the cells, but not the pictures included in the selected range.I don't want to use Selection.delete because there are named ranges in the sheet that I don't want to disturb. I just want the pictures deleted from my real estate.Any suggestions ?Thanks.
 
sjoo
Posts: 0
Joined: March 24th, 2003, 1:54 am

Deleting a picture from Excel using VBA

May 13th, 2005, 3:22 am

hi poochie!pictures on the worksheet are shape object.shape object has two properties that return a range object that represents the cell that lies under the lower-right (BottonRightCell property) or the upper-left corner(TopLeftCell property) of the shape object.regards.sjoo