Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Row deletion event: identifying deleted row ID

Hi all,
I would like to know if there is a way to identify which is the index of a
row deleted from the sheet.
Browsing the web I found some method to identify a row deletion event but
not the row index.

Thanks in advance for the help,

faffo1980
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Row deletion event: identifying deleted row ID

Once you havw determined that a row has been deleted:

MsgBox Target.Row

will identify the row
--
Gary''s Student - gsnu200908


"faffo1980" wrote:

Hi all,
I would like to know if there is a way to identify which is the index of a
row deleted from the sheet.
Browsing the web I found some method to identify a row deletion event but
not the row index.

Thanks in advance for the help,

faffo1980

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Row deletion event: identifying deleted row ID

Try the below to track row deletions from the used range...Select the sheet
tab which you want to work with. Right click the sheet tab and click on 'View
Code'. This will launch VBE. Paste the below code to the right blank portion.
Get back to to workbook and try out.

Private Sub Worksheet_Change(ByVal Target As Range)
Static lngRows As Long
If UsedRange.Rows.Count < lngRows Then
MsgBox "Row " & Target.Row & "deleted"
End If
lngRows = Me.UsedRange.Rows.Count
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"faffo1980" wrote:

Hi all,
I would like to know if there is a way to identify which is the index of a
row deleted from the sheet.
Browsing the web I found some method to identify a row deletion event but
not the row index.

Thanks in advance for the help,

faffo1980

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Row deletion event: identifying deleted row ID

It works...
Thanks a lot!

faffo1980


"Jacob Skaria" wrote:

Try the below to track row deletions from the used range...Select the sheet
tab which you want to work with. Right click the sheet tab and click on 'View
Code'. This will launch VBE. Paste the below code to the right blank portion.
Get back to to workbook and try out.

Private Sub Worksheet_Change(ByVal Target As Range)
Static lngRows As Long
If UsedRange.Rows.Count < lngRows Then
MsgBox "Row " & Target.Row & "deleted"
End If
lngRows = Me.UsedRange.Rows.Count
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"faffo1980" wrote:

Hi all,
I would like to know if there is a way to identify which is the index of a
row deleted from the sheet.
Browsing the web I found some method to identify a row deletion event but
not the row index.

Thanks in advance for the help,

faffo1980

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
i deleted info in excel then saved. can i recover deleted info? jbhtbruce Excel Discussion (Misc queries) 2 May 25th 10 08:54 AM
deleted text character returning numbers when deleted. Trreborr09 New Users to Excel 3 April 11th 10 03:17 AM
apply cell change event to single column - WorksheetChange Event [email protected] Excel Programming 6 May 4th 08 02:28 AM
If No is deleted in middle of sequence,Nos alter after deleted No crusty53 New Users to Excel 3 June 20th 06 09:50 AM
Is there some way (event) to know when an embedded chart is deleted? [email protected] Charts and Charting in Excel 9 February 11th 05 03:26 PM


All times are GMT +1. The time now is 06:13 AM.

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"