Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 846
Default Worksheets events

Where is a good site to explain the difference between the following VBA codes?

Worksheet_Change
Worksheet_SelectionChange

Looking at Walkenbach 2003 (VBA book) pages 621-626. I'm confused
is SelectionChange before you hit enter and Worsheet_Change after you hit
enter?
If it is possible to have both is there an order that has to be followed.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Worksheets events

Brad,

I'm not sure you'll get a better reference site/book then JWalk

Worksheet_SelectionChange
Is just that and has nothing to do with changing the contens of a cell.
change the selection to a different cell and the event fires.

Worksheet_Change

This requires a cell value on the sheet to be changed but won't be fired if
a formula output changes unless it was a cell on the same sheet that caused
the formula value to change. It isn't linked to ENTER. Change a value of a
cell and TAB out and the event fires.

One place where the unaware can really fall over is that if you use
worksheet event code to change a cell value then that calls the event again
so you get another call.

have a look at enableevents for how to get around this.

Mike






"Brad" wrote:

Where is a good site to explain the difference between the following VBA codes?

Worksheet_Change
Worksheet_SelectionChange

Looking at Walkenbach 2003 (VBA book) pages 621-626. I'm confused
is SelectionChange before you hit enter and Worsheet_Change after you hit
enter?
If it is possible to have both is there an order that has to be followed.

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
how to compare times of events btwn worksheets daveg Excel Worksheet Functions 1 February 28th 09 07:35 PM
How do i create a set of worksheets indvidual events to a master qundiva Excel Discussion (Misc queries) 1 December 20th 07 06:01 PM
do events? background events cereldine[_15_] Excel Programming 1 April 12th 06 01:06 PM
Any mouse events for Worksheets? InExcelHell Excel Programming 0 January 10th 05 11:17 PM
How to trap KeyDown Events For Worksheets ? Adrian[_7_] Excel Programming 1 August 3rd 04 11:00 AM


All times are GMT +1. The time now is 08:00 AM.

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

About Us

"It's about Microsoft Excel"