Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
ben ben is offline
external usenet poster
 
Posts: 232
Default Assigning multiple shapes to macro.

At run-time, various Auto-Shapes are added and deleted, and bulk assigned to
one macro. Is there any way to determine which auto-shape called the macro?
Eg. was it Shape1,Shape2,Shape3, etc...




--
When you lose your mind, you free your life.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Assigning multiple shapes to macro.

use the caller property

Sub Generic_click()
Dim sName as String, shp as Shape
sName = Application.Caller
set shp = ActiveSheet.Shapes(sName)


end Sub

--
Regards,
Tom Ogilvy

"ben" (remove this if mailing direct) wrote in message
...
At run-time, various Auto-Shapes are added and deleted, and bulk assigned

to
one macro. Is there any way to determine which auto-shape called the

macro?
Eg. was it Shape1,Shape2,Shape3, etc...




--
When you lose your mind, you free your life.



  #3   Report Post  
Posted to microsoft.public.excel.programming
ben ben is offline
external usenet poster
 
Posts: 232
Default Assigning multiple shapes to macro.

Beautiful, thanks mate

--
When you lose your mind, you free your life.


"Tom Ogilvy" wrote:

use the caller property

Sub Generic_click()
Dim sName as String, shp as Shape
sName = Application.Caller
set shp = ActiveSheet.Shapes(sName)


end Sub

--
Regards,
Tom Ogilvy

"ben" (remove this if mailing direct) wrote in message
...
At run-time, various Auto-Shapes are added and deleted, and bulk assigned

to
one macro. Is there any way to determine which auto-shape called the

macro?
Eg. was it Shape1,Shape2,Shape3, etc...




--
When you lose your mind, you free your life.




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
Selecting Multiple Shapes and Lines Nash Excel Discussion (Misc queries) 1 February 19th 10 11:42 PM
Excel 2007 - Select Multiple Shapes Barb Reinhardt Excel Discussion (Misc queries) 2 March 18th 09 03:17 PM
How do i change the size of multiple shapes at the same time? Amber Excel Discussion (Misc queries) 0 September 25th 08 09:14 PM
Naming Auto Shapes and Creating new Shapes AL2000 Excel Discussion (Misc queries) 3 September 10th 07 04:12 AM
Assigning Macros to Grouped Shapes Spinner Excel Programming 0 December 30th 05 03:38 PM


All times are GMT +1. The time now is 11:05 PM.

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"