View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
kls[_2_] kls[_2_] is offline
external usenet poster
 
Posts: 11
Default Error proofing automatic updating a cell

I have written a sub using a worksheet_change_event to place the date in
the first column of a row, whenever data is placed in any other cell in
that row. The following works fine:

Private Sub Worksheet_Change(ByVal Target As Range)
ActiveCell.EntireRow.Cells(0, 1).Value =
Worksheets("Client").Range("A2")
End Sub

(A2 is the source date)
The problems is if the user intends to add data to the next empty row,
but instead inadvertently changes data in a cell in a row already
containing data (and a date) thereby changing the date. What approach
is the cleanest?

Thanks,




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!