Excel - finding shapes

Nomadscot

Registered User.
Local time
Today, 13:05
Joined
Apr 9, 2014
Messages
26
Good morning all,

This should brighten up your morning.

I've got myself in a bit of a fix.

I've lost two shapes in a worksheet, and can't find them because they are formatted with no fill and no borders.

There are a number of other shapes in the sheet which are formatted and so are visible.

Any idea how I can find my two runaway shapes? It's important because they have macros assigned, and so a user may find himself clicking on them unexpectedly, with unfortunate consequences.

Go on - have a good laugh.....

:)
 
Oops...! have you tried using something like

Code:
Dim Shape As Shape

For Each Shape In ActiveSheet.Shapes
 
        Shape.Select
        Debug.Print Shape.Name
        Debug.Print Shape.Left
        Debug.Print Shape.Top
        Debug.Print Shape.BottomRightCell.Address
        Debug.Print Shape.TopLeftCell.Address
        
Next
 
Hi Rich,

Thanks so much for your reply, which tracked down my runaway shapes like a bloodhound on the scent of a large bowl of Pedigree Chum!

In fact I couldn't fully understand the full routine - particularly the 'print' reference, so I remmed out all but the last line and then cycled through the routine with F8, which selected all the shapes in turn, including the cheeky ones that thought they could hide from me. They reckoned without access-programmers.co.uk, and richsql!

Thanks again - and 'Thanks' button duly clicked. (Or it will be in a minute)
 

Users who are viewing this thread

Back
Top Bottom