![]() |
Detecting when Excel user inserts or deletes a row
I want to know when an Excel user either deletes or inserts a row so that I
can modify other cells to reflect the loss (or gain) of the row. Is there an event that occurs (like in Worksheet_Change) that I can inspect to see what they have done? Thanks in advance. Warren |
Detecting when Excel user inserts or deletes a row
Hi W,
This is an often asked question, but no such event is exposed. --- Regards, Norman "wjewell" wrote in message ... I want to know when an Excel user either deletes or inserts a row so that I can modify other cells to reflect the loss (or gain) of the row. Is there an event that occurs (like in Worksheet_Change) that I can inspect to see what they have done? Thanks in advance. Warren |
Detecting when Excel user inserts or deletes a row
Create a range name eg rLastRow - in the last row on the test. Test the row
value of the rLastRow on a selection change event. If it differs from previous value that you saved then your procedure can run. "Norman Jones" wrote: Hi W, This is an often asked question, but no such event is exposed. --- Regards, Norman "wjewell" wrote in message ... I want to know when an Excel user either deletes or inserts a row so that I can modify other cells to reflect the loss (or gain) of the row. Is there an event that occurs (like in Worksheet_Change) that I can inspect to see what they have done? Thanks in advance. Warren |
Detecting when Excel user inserts or deletes a row
Another way is to place a formula somewhere in the worksheet that refers to a
whole column like =COUNT(A:A). Now, whenever a row is inserted or deleted, the Worksheet_Calculate event will fire. Regards, Vic Eldridge "reuben" wrote: Create a range name eg rLastRow - in the last row on the test. Test the row value of the rLastRow on a selection change event. If it differs from previous value that you saved then your procedure can run. "Norman Jones" wrote: Hi W, This is an often asked question, but no such event is exposed. --- Regards, Norman "wjewell" wrote in message ... I want to know when an Excel user either deletes or inserts a row so that I can modify other cells to reflect the loss (or gain) of the row. Is there an event that occurs (like in Worksheet_Change) that I can inspect to see what they have done? Thanks in advance. Warren |
All times are GMT +1. The time now is 08:31 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com