View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
okrob okrob is offline
external usenet poster
 
Posts: 142
Default Worksheet_Change

Just so everyone sees the final event...
On workbook_open event, I set Sheet6.Cells(1, 199).Value =
Range("Data").Rows.Count so that it starts out with the correct value
in the cell to begin with in case someone deletes it...
Then I put this in the user worksheet.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim y as String
If Range("Data").Rows.Count < Sheet6.Cells(1, 199).Value Then
y = Target.Address
Sheet6.Range(y).Delete shift:=xlUp
Sheet1.Range(y).Delete shift:=xlUp
End If
Sheet6.Cells(1, 199).Value = Range("Data").Rows.Count
End Sub