Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default Cell entry triggers Worksheet_SelectionChange event

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Cell entry triggers Worksheet_SelectionChange event

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

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Daniel.C" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default Cell entry triggers Worksheet_SelectionChange event

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.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Cell entry triggers Worksheet_SelectionChange event

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" wrote in message
...
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




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default Cell entry triggers Worksheet_SelectionChange event

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" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
BeforeUpdate Event triggers twice [email protected] Excel Programming 1 April 4th 06 09:10 AM
Worksheet_selectionchange Event Alex Mackenzie Excel Programming 1 October 28th 05 04:10 PM
Event Triggers MVM Excel Programming 2 August 31st 05 03:29 PM
worksheet_SelectionChange Event ibeetb Excel Programming 1 January 16th 04 04:05 AM
Click event on cell triggers a macro kris Excel Programming 2 November 13th 03 10:42 AM


All times are GMT +1. The time now is 11:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"