ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I 'catch' a 'delete cells' event (https://www.excelbanter.com/excel-discussion-misc-queries/16877-how-do-i-catch-delete-cells-event.html)

Eric

How do I 'catch' a 'delete cells' event
 
I am using Office 2000 and am using the worksheet_chage event to manipulate
a few things in the sheet. The 'Change' event doesn't catch when a user
deletes a range of cells. Is it possible to catch the deletion of a range
of cells, or a row or a column?

Thanks in advance!!



Bob Umlas, Excel MVP

You can set up a keypress trap in the open event of the workbook:
Application.Onkey "{del}","RunMyDeleteProcedure"

at that procedure you can still clear the cells or whatever, and know that
they pressed that key.
Be sure to turn off the running of your procedure when the workbook is
closed (or deactivated, maybe):
Application.Onkey "{del}"

Bob Umlas
Excel MVP

"Eric" wrote:

I am using Office 2000 and am using the worksheet_chage event to manipulate
a few things in the sheet. The 'Change' event doesn't catch when a user
deletes a range of cells. Is it possible to catch the deletion of a range
of cells, or a row or a column?

Thanks in advance!!




Bernie Deitrick

Eric,

IIRC, Excel XP handles this properly, and XL2000 and earlier versions don't.
What version do you have, and what is the code that you are running?

HTH,
Bernie
MS Excel MVP

"Eric" wrote in message
...
I am using Office 2000 and am using the worksheet_chage event to

manipulate
a few things in the sheet. The 'Change' event doesn't catch when a user
deletes a range of cells. Is it possible to catch the deletion of a range
of cells, or a row or a column?

Thanks in advance!!






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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com