Is there a way to know when a worksheet has been clicked?

J

John

I would like to know how I can program a worksheet before click event,
similar to a worksheet before doubleclick event or if there is a way
that can make me know when a worksheet has been clicked.

Thank you
John
 
M

Myrna Larson

Since clicking a cell selects it, maybe you could use the SelectionChange event. However, that
will be triggered when the user moves the cell cursor with the keyboard.
 
J

John

Myrna Larson said:
Since clicking a cell selects it, maybe you could use the SelectionChange event. However, that
will be triggered when the user moves the cell cursor with the keyboard.

I forgot to say that the worksheet is protected and selection is
disabled. I want to avoid the ugly worksheet protection message, "The
cell or chart you are trying to change is protected and therefore read
only. To modify a protected cell or chart blah blah blah ..." that
pops up when a user tries to type on a protected worksheet
 
S

steve

John,

Put this into a module or event module
ActiveSheet.EnableSelection = xlUnlockedCells
or
Sheets("mysheet").EnableSelection = xlUnlockedCells
this way the user can't select a protected cell.

steve
 

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