Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
tom tom is offline
external usenet poster
 
Posts: 570
Default Shape Selection Name

I have several shapes on a spreadsheet that I want to assign a common macro,
but within the macro I need to know the shape location.

I need to know how to find XXX (the shape name or index) to get it to a
location

Sub box_select()
Set Sx = ActiveSheet
Lx = Sx.Shapes(XXX).TopLeftCell.Address
Range(Lx).Select
End Sub

Thanks.

Tom
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Shape Selection Name

You have a macro that's assigned to the shape and you want to know what shape
was clicked?

Lx = Sx.Shapes(application.caller).TopLeftCell.Address

Tom wrote:

I have several shapes on a spreadsheet that I want to assign a common macro,
but within the macro I need to know the shape location.

I need to know how to find XXX (the shape name or index) to get it to a
location

Sub box_select()
Set Sx = ActiveSheet
Lx = Sx.Shapes(XXX).TopLeftCell.Address
Range(Lx).Select
End Sub

Thanks.

Tom


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Shape Selection Name

Hi Tom,

Dim XXX as string
XXX = Application.Caller

Also have a look at Application.Goto(ref, true/false)

Regards,
Peter


"Tom" wrote in message
...
I have several shapes on a spreadsheet that I want to assign a common

macro,
but within the macro I need to know the shape location.

I need to know how to find XXX (the shape name or index) to get it to a
location

Sub box_select()
Set Sx = ActiveSheet
Lx = Sx.Shapes(XXX).TopLeftCell.Address
Range(Lx).Select
End Sub

Thanks.

Tom



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
Copy Selection - Transpose Selection - Delete Selection Uninvisible Excel Discussion (Misc queries) 2 October 23rd 07 04:18 PM
my curser changed from arrow shape to a cross shape???? bj New Users to Excel 1 February 5th 07 02:47 PM
Shape Selection Event !! RAFAAJ2000[_2_] Excel Programming 3 May 29th 05 08:42 PM
Deleting a shape and the cell contents the shape is in. Dave Peterson[_3_] Excel Programming 1 October 9th 03 03:36 PM
Deleting a shape and the cell contents the shape is in. Tom Ogilvy Excel Programming 0 October 9th 03 03:43 AM


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

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

About Us

"It's about Microsoft Excel"