View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
anonymousA anonymousA is offline
external usenet poster
 
Posts: 32
Default Determine last clicked object / control

why don't you use a class module where a single macro could do the job
for any label ?
By the way, in this macro, it's an easy job to make the clicked label's
name appear.

Regards
Rex a écrit :
How can one click any object in Excel and have VB tell you the name of the
object that you clicked. For instance, if I click label1, VB gives me a
message telling me that I clicked label1, and if it was label2, it says
label2. The trick is that I would like to do this by using only one macro,
and not two as would be easy for 2 labels. The reason behind this is that
when using a lot of labels, the macros are to many to write.

Regards
Rex