How do you detect a Left click on a Worksheet

M

Mike

Is there a way to detect a Left Mouse Click on a Worksheet?
Something like the event procedures "Workbook_SheetBeforeDoubleClick" for a
double
left click or "Workbook_SheetBeforeRightClick" for a right click.
Or, some other way???

Thanks.
 
C

Claus Busch

Hi Mike,

Am Sun, 17 Jul 2011 09:27:37 -0700 schrieb Mike:
Is there a way to detect a Left Mouse Click on a Worksheet?
Something like the event procedures "Workbook_SheetBeforeDoubleClick" for a
double
left click or "Workbook_SheetBeforeRightClick" for a right click.

with left click you select a cell. Try:
Worksheet_SelectionChange


Regards
Claus Busch
 
M

Mike

"Worksheet_SelectionChange" also detects any selection changes you make in
the code. Thus, I can't differentiate between a physical mouse click and a
selection change due to a code selection change.
 
C

Claus Busch

Hi Mike,

Am Sun, 17 Jul 2011 09:58:04 -0700 schrieb Mike:
"Worksheet_SelectionChange" also detects any selection changes you make in
the code. Thus, I can't differentiate between a physical mouse click and a
selection change due to a code selection change.

you can stop any event by code selection change with:
Application.EnableEvents = False
At the end of code you have to turn to TRUE


Regards
Claus Busch
 
M

Mike

Thanks Claus !

Claus Busch said:
Hi Mike,

Am Sun, 17 Jul 2011 09:58:04 -0700 schrieb Mike:


you can stop any event by code selection change with:
Application.EnableEvents = False
At the end of code you have to turn to TRUE


Regards
Claus Busch
 

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