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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel: select mult. shapes based on their name

Status
Not open for further replies.

565u

Technical User
Apr 25, 2005
46
CZ
Hi and thanks for reading my post!

I have several shapes in one sheet and they have names such as "BigShape 10", "BigShape 11", "MedShape 7", etc. When the shape is selected I use this name to tell what the shape type is and what to do with it. But I have a big problem. I cannot figure out how to select e.g. all shapes that have "Big" at the beginning of their name; or all shapes with number 12. I've been toying with the ActiveSheet.Shapes.Range("name").Select syntax, trying some wildcards but it's probably not the way to go.

Could anybody kindly help, please?


Many thanks in advance!!


Pavel
 
Dim strNAme as string

strname = activeshape.name ' you will need to look up the correct syntax here
If left(strname,3) = "BIG" then
your code here
end if



Chance,

Filmmaker, gentleman and Legal champion of the small people.
 
Thanks for reply, but if i understand it correctly, it does more or less what i am already doing with shapes. i know how to work with a selected shape. my problem is to select more of them (see the first post) and i don't think that's what your code is doing.

Pavel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top