Hi,
Is there a way for code to delete all shapes that are visible on the sheet? Specifically, I want to delete any drawn arrows text boxes and that are visible on Sheet11.
Thanks,
Lawrence
Hi,
Is there a way for code to delete all shapes that are visible on the sheet? Specifically, I want to delete any drawn arrows text boxes and that are visible on Sheet11.
Thanks,
Lawrence
Last edited by skysurfer; 01-21-2011 at 12:35 PM.
Hi Lawrence,
One way...
RgdsPlease Login or Register to view this content.
.... sorry, just realised you asked about Visible shapes. How are you defining Visible? Shapes in Hidden columns or shapes that have a background colour the same as the sheet background?
Last edited by Richard Buttrey; 01-20-2011 at 07:43 PM.
Richard Buttrey
RIP - d. 06/10/2022
If any of the responses have helped then please consider rating them by clicking the small star icon below the post.
Richard,
The shapes that are hidden are drawing objects like text boxes, as well as ActiveX and form controls. The only shape I want to be able to delete are arrows with a drawing text box inside.
I am using the following code to hide shapes:
'Please Login or Register to view this content.
Thanks!
Lawrence
Last edited by skysurfer; 01-20-2011 at 08:46 PM.
Hi,
How about
It assumes you haven't changed the shape names from their default names which contain "Arrow"Please Login or Register to view this content.
Richard,
Will that code delete every shape with the word arrow anywhere in the shape name? If so, I could also delete the drawing text box if that had the name arrow in it as well, yes?
Just one little problem: I could delete shapes I know the names of, but a pokey user could spot the shape's name in the Name Box and for whatever reason change it. That's why I thought I could cast a broad net and delete every shape that is not hidden no matter what their names are.
Is there any way to say if shapes hidden property = false, then delete it?
Thanks for all your help!
Lawrence
Will delete visible items from the drawingobjects collection, which is not the same as shapes collection.
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks