Cell On_Click Event

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All

In Excel is there a on_cell click event.

ie. when cell a3 is selected a msgbox is dispalyed.


Thanks in Advance
 
Thre are many event triggers within excel

this is some of them that may suit your needs

On selection change
before Double Click
before right Click
on Change

event triggers that can be coded to do actions if the event applies t
a
 
Right click on the sheet tab and select view code. In the left dropdown of
the module select worksheet. In the right, select SelectionChange

this fires when a cell is selected.

It is not restricted to clicking on the cell - it also fires if you move the
cursor into it using the keyboard.

See Chip Pearson's page on Events

http://www.cpearson.com/excel/events.htm
 
The SelectionChange event as suggested by Tom works for
most situations similar to what might be described as an
"on-cell click".

However if you consecutively click a shape and the
previously selected cell then no events are triggered.

In this scenario the previously selected cell remains
the "Active cell" so reselecting it does not change the
selection. AFAIK there are no events associated with
shapes, such as GotFocus and LostFocus (Class OLEobject).

If I've got this wrong and there is a way to cater for
reselecting the previous active cell or any shape events I
would be very pleased to know!

Regards,
Sandy

savituk yahoo co uk
 

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