line delete interception

  • Thread starter Thread starter jean-paul.bataille
  • Start date Start date
J

jean-paul.bataille

Hi from Paris (France)

I want to save a specified data (cell in colonne A:A) of a line to be
deleted, before suppression.
How can intercept the line delete event ?


Thanks by anticipation,
 
Hi,

The row delete fires the 'Worksheet_Change' event ... but so do lots of
things.

Regards,

Chris.
 
Thanks Chris for the suggestion,
Is there any way to detect deleted line , previously its deletion ?
 
Hi,

Unfortunately the Target range returned in Worksheet_Change refers to the
new row (i.e. the one that was below what you have deleted).

I looked at something like;

If Target.Rows.Count = 1 And Target.Columns.Count = 256 Then

Application.Undo

'Save the details down here

Application.Repeat

End If

But I don't think there is the sophistication in the worksheet events to
capture this. I've looked at Application.Undo ... but does not seem to meet
the need. I think you would need to set up your own 'delete row' macro & have
users use that macro.

Regards,

Chris.
 
Unfortunately, there is no way to detect when a user deletes a
row.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top