View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Returning Image Details

Try this -

Sub myOnActionMacro()
Dim sCaller As String

sCaller = Application.Caller

MsgBox sCaller

End Sub

You can assign the same macro to all all your images and perhaps use "Select
Case sCaller" to branch.

Regards,
Peter T

"Kaval" wrote in message
...
I have a procedure that inserts various images onto a spreadsheet.

I want to be able to select an image (by clicking or maybe right clicking

or
double clicking) and have a procedure to return the name of the image

object.

For example, if i click on a particular image that was named "Image_A"

when
it was inserted, I would like the macro to return "Image_A".

I tried assigning a macro to the images as they were inserted (using
.onaction) but I don't know how to get that macro to return the name of

the
object that set it running.

Hope this makes sense, Kaval