PC Review


Reply
Thread Tools Rate Thread

Cell entry triggers Worksheet_SelectionChange event

 
 
Daniel.C
Guest
Posts: n/a
 
      21st Nov 2009
Tested in Excel 2003 fr, Excel 2007 fr, Excel 2010 beta en.
When you enter any character in a cell, the Worksheet_SelectionChange
event macro is fired (the target cell is still the active cell, no move
after entry).
Anyone heard of it ?
TIA
Daniel


 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      21st Nov 2009
code NOT restricted?
As ALWAYS, post your code for comments.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"Daniel.C" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Tested in Excel 2003 fr, Excel 2007 fr, Excel 2010 beta en.
> When you enter any character in a cell, the Worksheet_SelectionChange
> event macro is fired (the target cell is still the active cell, no move
> after entry).
> Anyone heard of it ?
> TIA
> Daniel
>
>


 
Reply With Quote
 
Daniel.C
Guest
Posts: n/a
 
      21st Nov 2009
Just add the following macro to a sheet in a blank workbook :

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
MsgBox "Selection change " & Target.Address
End Sub

> code NOT restricted?
> As ALWAYS, post your code for comments.



 
Reply With Quote
 
Peter T
Guest
Posts: n/a
 
      21st Nov 2009
That is normal. When you go into edit mode, then press Enter, the old active
cell is re-selected. If you programmatically change the value of a cell
(even re-apply the same value) only the 'Change' event will fire.

(There are one or two other programmatic actions which will trigger the
SelectionChange without doing anything at all to cells)

Regards,
Peter T

"Daniel.C" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Tested in Excel 2003 fr, Excel 2007 fr, Excel 2010 beta en.
> When you enter any character in a cell, the Worksheet_SelectionChange
> event macro is fired (the target cell is still the active cell, no move
> after entry).
> Anyone heard of it ?
> TIA
> Daniel
>
>



 
Reply With Quote
 
Daniel.C
Guest
Posts: n/a
 
      21st Nov 2009
Thanks. Good to know anyway, even if I can't think that it's normal.
Daniel

> That is normal. When you go into edit mode, then press Enter, the old active
> cell is re-selected. If you programmatically change the value of a cell (even
> re-apply the same value) only the 'Change' event will fire.
>
> (There are one or two other programmatic actions which will trigger the
> SelectionChange without doing anything at all to cells)
>
> Regards,
> Peter T
>
> "Daniel.C" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Tested in Excel 2003 fr, Excel 2007 fr, Excel 2010 beta en.
>> When you enter any character in a cell, the Worksheet_SelectionChange
>> event macro is fired (the target cell is still the active cell, no move
>> after entry).
>> Anyone heard of it ?
>> TIA
>> Daniel
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cell Change triggers Worksheet Event Charles Microsoft Excel Programming 13 9th Jan 2010 12:13 AM
Worksheet_selectionchange Event =?Utf-8?B?QWxleCBNYWNrZW56aWU=?= Microsoft Excel Programming 1 28th Oct 2005 04:10 PM
worksheet_SelectionChange Event ibeetb Microsoft Excel Programming 1 16th Jan 2004 04:05 AM
Click event on cell triggers a macro kris Microsoft Excel Programming 2 13th Nov 2003 10:42 AM
Worksheet_SelectionChange Event G R E G Microsoft Excel Programming 5 27th Aug 2003 07:59 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:09 PM.