Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default macro associated with shape object, useful approach if can be solv

I have a several shape objects in a spreadsheets and want to assign macro to
the shape click event. My question is, instead of assigning each shape to a
specific macro, if I can assign all shapes to the same macro. Then, inside
the macro, based on which shape calls (by name or somthing else), do
different things. But I have a hard time to find which shape calls, by using
something like ActiveShape (my imagination). The shape seems not in selected
mode when clicked. The shapes are dynamically generated and I am using Excel
XP.
Thanks for your help.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default macro associated with shape object, useful approach if can be solv

sub ShapeClick()
msgbox application.caller
end sub


--
Tim Williams
Palo Alto, CA


"pshen" wrote in message
...
I have a several shape objects in a spreadsheets and want to assign macro

to
the shape click event. My question is, instead of assigning each shape

to a
specific macro, if I can assign all shapes to the same macro. Then,

inside
the macro, based on which shape calls (by name or somthing else), do
different things. But I have a hard time to find which shape calls, by

using
something like ActiveShape (my imagination). The shape seems not in

selected
mode when clicked. The shapes are dynamically generated and I am using

Excel
XP.
Thanks for your help.



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
Programmatically adding buttons to a worksheet (Shape Object) Phil Excel Programming 3 January 26th 04 03:51 PM
How to tell wich object/shape was clicked Andrew Ofthesong Excel Programming 2 December 1st 03 05:05 PM
XL2000: Shape object events GSQUARED Excel Programming 1 October 22nd 03 05:15 PM
Hyperlink within the TextFrame of Shape Object..? Robert Stober Excel Programming 0 October 12th 03 10:05 PM
How to hide Excel window when activating a Shape object Bob Kilmer Excel Programming 0 September 27th 03 03:51 PM


All times are GMT +1. The time now is 10:58 PM.

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"