Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
i deleted info in excel then saved. can i recover deleted info? | Excel Discussion (Misc queries) | |||
deleted text character returning numbers when deleted. | New Users to Excel | |||
apply cell change event to single column - WorksheetChange Event | Excel Programming | |||
If No is deleted in middle of sequence,Nos alter after deleted No | New Users to Excel | |||
Is there some way (event) to know when an embedded chart is deleted? | Charts and Charting in Excel |