Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Returning Image Details

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   Report Post  
Posted to microsoft.public.excel.programming
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



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
Is there any way to search image of my local drive with Image name or Image Title, Description [email protected] Excel Programming 3 August 3rd 07 01:44 PM
VBA to display image on a form - image is defined in Range Name Tan Excel Programming 4 May 17th 06 03:37 PM
Hyperlink to an image in other worksheet, displaying entire image. twilliams Excel Worksheet Functions 0 February 7th 06 10:02 PM
copy shape image into image control Luc Benninger Excel Programming 2 July 15th 04 11:14 AM
Export the worksheet background image as an image file - possible? DataFreakFromUtah Excel Programming 2 April 10th 04 04:49 PM


All times are GMT +1. The time now is 09:27 AM.

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"