Selecting Drawing Object By Name

  • Thread starter Thread starter Zone
  • Start date Start date
Z

Zone

I have several drawing objects on a worksheet. I have assigned each of
them a name. How do select the object by using its name in VBA code?
Excel 2002. TIA, James
 
Dim shp as Shape
Set shp = ActiveSheet.Shapes("name")
shp.Select

But - if you use a shape variable like this you can probably do what
you want directly with shp rather than Selection. If you want to just
select then

ActiveSheet.Shapes("name").Select

works

HTH

-John Coleman
 
Thank you, Gary. Turning record on and selecting the shape gave me the
same answer! Guess I was having a senior moment there. <g> Happy
Holidays! James
 
Back
Top