Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 269
Default Selecting Drawing Object By Name

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Selecting Drawing Object By Name

i named a shape square.

activesheet.shapes("square").select

--


Gary


"Zone" wrote in message
ps.com...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 274
Default Selecting Drawing Object By Name

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

Zone wrote:
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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 269
Default Selecting Drawing Object By Name

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
Gary Keramidas wrote:
i named a shape square.

activesheet.shapes("square").select

--


Gary


"Zone" wrote in message
ps.com...
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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Floating Drawing Object CLR Excel Programming 9 June 25th 06 03:40 AM
Drawing Object in a Userform Zone Excel Programming 4 May 9th 06 08:27 PM
Drawing Object Shawn Excel Programming 2 March 2nd 05 03:04 PM
Selecting drawing objects or shapes in a macro John DeFiore Excel Programming 3 October 13th 03 02:26 PM
Drawing object references JASon Excel Programming 2 August 28th 03 10:49 PM


All times are GMT +1. The time now is 07:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"