View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Trace all the changed cells range...

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
if Target.Column.count = 1 and Target.Column = 1 then
Application.EnableEvents = False
Target.offset(0,1).ClearContents
End if
Application.EnableEvents = True
End Sub

--
Regards,
Tom Ogilvy


"Sridhar Pentlavalli via OfficeKB.com" wrote in message
...

Hi

Can any body help me how to idenify the changed range of cells.

If cells D1:D4 are selected and deleted then cells E1:E4 should also be

deleted.

I am using the following code for it.

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As

Range)
changed_row = Target.Row
changed_column = Target.Column
' Do the process
End Sub

But with the above code, I am able to trace only first cell D1 and I am

deleting E1. How to put it in loop to trace all the changed cells range.

Thanks in advance
Sridhar P

--
Message posted via http://www.officekb.com