View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
AndyT AndyT is offline
external usenet poster
 
Posts: 7
Default I have a problem with determining if a shape is selected.

This works in all but one respect. The name returned is the underlying
'autoshape###' format name & not the 'Desk ##' format name that I named the
group. The way the name box works is what I'm looking for, when I click on a
shape or group of shapes, the name I've given to the objects appears.
Thanks for your help
AndyT
"Gary''s Student" wrote:

Dim s As Shape
Set s = ActiveSheet.Shapes(Application.Caller)

In the macro assigned to the Shape, this is the Shape clicked. For example:


Sub shpname()
Dim s As Shape
Set s = ActiveSheet.Shapes(Application.Caller)
MsgBox (s.Name)
End Sub

--
Gary''s Student - gsnu200720


"AndyT" wrote:

I've formatted a worksheet to represent an office plan. I have shapes and
grouped shapes to represent assetts
What I want is to click on a shape, returning the name of the shape selected.
I would use this name to get associated information from a database
spreadsheet.
There isn't any property 'Selected' or 'Activated' associated with the Shape
object.
Anyone know how to do this? Any response would be much appreciated.
Using Excel2002 (10.2614.2625)
O/S XP