which shape clicked?

  • Thread starter Thread starter hfli999
  • Start date Start date
H

hfli999

Hi,

I have two shapes on a slide. Both needs to run same macro. Is there
way to know which one user clicked?

Thanks
 
Great. Thanks!

Is there any way to know where is my mouse pointer position in click
or mouse over macro?
 
Great. Thanks!

Is there any way to know where is my mouse pointer position in click
or mouse over macro?

Since you just clicked on or moused over the shape that triggered the macro,
you can always do:

Sub whatever(oshp As Shape)
MsgBox oshp.Top & vbcrlf _
& oshp.left & vbcrlf _
& oshp.height & vbcrlf _
& oshp.width
End Sub

In other words, you know the mouse is somewhere within the shape.

Or did you need more precision than that?
 

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

Back
Top