Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Is there any way to search image of my local drive with Image name or Image Title, Description | Excel Programming | |||
VBA to display image on a form - image is defined in Range Name | Excel Programming | |||
Hyperlink to an image in other worksheet, displaying entire image. | Excel Worksheet Functions | |||
copy shape image into image control | Excel Programming | |||
Export the worksheet background image as an image file - possible? | Excel Programming |