View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Calling From Shapes

Jase,

The Application.Caller property will return a String containing
the name of the shape that caused the macro to be called. You can
use this in code similar to

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


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Jase" wrote in message
...
Hi All

I have this problem that I have a sheet with lots of
shapes on it that I am using as buttons. All of the
shapes are calling to exactly the same macro and the only
difference between the shapes is that they have a
different web text string associated with them.

The problem is that I can not seem to determine which
shape is calling the macro. Is there a command that I can
use to extract the web text from the shape that called the
macro?