• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Detect which Picture clicked

Andy Walker

New Member
Hi All
I use the short Macro below to copy a thumnail picture to a cell on anther part of the worksheet but it is hard coded to "Picture 231"
how could I change the code to insert the name of any of my Array of thumnail Pictures. i.e. "Picture 234" etc on clicking that picture.

Code:
    ActiveSheet.Shapes.Range(Array("Picture 231")).Select
    Selection.Copy
    ActiveCell.Select
    ActiveSheet.Pictures.Paste.Select

Hope you can help, anyway thank you for reading.
Andy.
 
Select all the pictures you want to behave that way, right-click and assign the macro blah to all of them in one shot.
This is the code blah:
Code:
Sub blah()
ActiveSheet.Shapes(Application.Caller).Copy
ActiveSheet.Pictures.Paste
End Sub
 
Select all the pictures you want to behave that way, right-click and assign the macro blah to all of them in one shot.
This is the code blah:
Code:
Sub blah()
ActiveSheet.Shapes(Application.Caller).Copy
ActiveSheet.Pictures.Paste
End Sub

Many Thanks for your assistance.
All working fine now.
Andy....
 
Back
Top