Finding an Object in excel with name

S

Subbu2204

Hi,

There are lots of object in my worksheet. I need to find an object whether
it present or not simply by its name instead of looping through all the
objects with the name.

Thanks,
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?U3ViYnUyMjA0?=,
There are lots of object in my worksheet. I need to find an object whether
it present or not simply by its name instead of looping through all the
objects with the name.
I assume you're referring to the SHAPES collection?

If you address a Shape by name - Shapes("the name") - and the shape isn't
present you should get an error message. Trap the error message.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top