Which picture was clicked

B

Bob Flanagan

I have several hundred pictures on a worksheet. I want to assign the same
macro to each picture, but have the macro determine which picture was
clicked. Is this possible?

Bob
 
D

Dave Peterson

Dim myPict as picture
set mypict = activesheet.pictures(Application.caller)

msgbox mypict.name & vblf & mypict.topleftcell.address 'or anything you want
 
B

Bob Flanagan

Many thanks.

Bob

Dave Peterson said:
Dim myPict as picture
set mypict = activesheet.pictures(Application.caller)

msgbox mypict.name & vblf & mypict.topleftcell.address 'or anything you
want
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top