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


What is the best way of identifying if the worksheet change event was
triggered by anything other than a change in the contents of a cell?

I want to be able to handle cell changes but am not interested in other
events such as inserting/deleting rows etc and want to exit the sub in
these situations.

The solution presumably involves some sort of test on the 'target'
range. Any ideas?


--
blatham
------------------------------------------------------------------------
blatham's Profile: http://www.excelforum.com/member.php...o&userid=19441
View this thread: http://www.excelforum.com/showthread...hreadid=483668

  #2   Report Post  
Posted to microsoft.public.excel.programming
ben ben is offline
external usenet poster
 
Posts: 232
Default Worksheet Change Event

suggestion,


Keep track of the current activecell of selection value maybe?

using the worksheetchangeselection event

--
When you lose your mind, you free your life.


"blatham" wrote:


What is the best way of identifying if the worksheet change event was
triggered by anything other than a change in the contents of a cell?

I want to be able to handle cell changes but am not interested in other
events such as inserting/deleting rows etc and want to exit the sub in
these situations.

The solution presumably involves some sort of test on the 'target'
range. Any ideas?


--
blatham
------------------------------------------------------------------------
blatham's Profile: http://www.excelforum.com/member.php...o&userid=19441
View this thread: http://www.excelforum.com/showthread...hreadid=483668


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default Worksheet Change Event

Test Target.Count. If a row is inserted/deleted then Target.Count will
be 256. If a column is inserted/deleted it will be 65536.
If a single cell is changed it will be 1.

Hope this helps
Rowan

blatham wrote:
What is the best way of identifying if the worksheet change event was
triggered by anything other than a change in the contents of a cell?

I want to be able to handle cell changes but am not interested in other
events such as inserting/deleting rows etc and want to exit the sub in
these situations.

The solution presumably involves some sort of test on the 'target'
range. Any ideas?


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Worksheet Change Event


Yeh that's good for highlighting a column or row deletion or insertion.
I could do with knowing whether individual cells have bee
inserted/deleted too (the target.cells.count for these situations wil
be 1 when this happens too).

Any other ideas

--
blatha
-----------------------------------------------------------------------
blatham's Profile: http://www.excelforum.com/member.php...fo&userid=1944
View this thread: http://www.excelforum.com/showthread.php?threadid=48366

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Worksheet Change Event

Hi Rowan,

I do not think that the Worksheet_Change event responds to the insertion of
a row or a column.

Also, I do not think that the event distinguishes between the deletion of
rows or columns and value changes to the entire row/column.

---
Regards,
Norman


"Rowan Drummond" wrote in message
...
Test Target.Count. If a row is inserted/deleted then Target.Count will be
256. If a column is inserted/deleted it will be 65536.
If a single cell is changed it will be 1.

Hope this helps
Rowan

blatham wrote:
What is the best way of identifying if the worksheet change event was
triggered by anything other than a change in the contents of a cell?

I want to be able to handle cell changes but am not interested in other
events such as inserting/deleting rows etc and want to exit the sub in
these situations.

The solution presumably involves some sort of test on the 'target'
range. Any ideas?




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Worksheet Change Event


Hi Norman

The worksheet change event does respond to column/row and cell
insertions/deletions.

My original question was whether or not in the code of the event you
coud establish whether the event was triggered as a result of a change
in the contents of a cell or something else (e.g. inserts/deletes).


--
blatham
------------------------------------------------------------------------
blatham's Profile: http://www.excelforum.com/member.php...o&userid=19441
View this thread: http://www.excelforum.com/showthread...hreadid=483668

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Worksheet Change Event

Hi B,

The worksheet change event does respond to column/row and cell
insertions/deletions.


I agree that deletions trigger the change event; I suggested that (for me)
row/column insertions did not.

Is your experience different and, if so, what version are you using?


---
Regards,
Norman


"blatham" wrote in
message ...

Hi Norman

The worksheet change event does respond to column/row and cell
insertions/deletions.

My original question was whether or not in the code of the event you
coud establish whether the event was triggered as a result of a change
in the contents of a cell or something else (e.g. inserts/deletes).


--
blatham
------------------------------------------------------------------------
blatham's Profile:
http://www.excelforum.com/member.php...o&userid=19441
View this thread: http://www.excelforum.com/showthread...hreadid=483668



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Worksheet Change Event


It is certainly the case in 2002 & 2003.

Be

--
blatha
-----------------------------------------------------------------------
blatham's Profile: http://www.excelforum.com/member.php...fo&userid=1944
View this thread: http://www.excelforum.com/showthread.php?threadid=48366

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
Worksheet change Event ranswert Excel Worksheet Functions 1 January 17th 08 11:17 PM
Worksheet Change event DoctorG Excel Discussion (Misc queries) 4 February 15th 06 12:53 PM
Worksheet Change event Gareth[_3_] Excel Programming 5 May 24th 05 09:39 PM
Change Cell from Validated List Not Firing Worksheet Change Event [email protected] Excel Programming 3 October 4th 04 03:00 AM


All times are GMT +1. The time now is 04:58 PM.

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"