Thread: Is it possible?
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nick Hodge Nick Hodge is offline
external usenet poster
 
Posts: 1,173
Default Is it possible?

Art

You could use a worksheet_change event. Something like...

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Not Application.Intersect(Target, Columns("A:A")) Is Nothing Then
MsgBox "You cannot enter data in column A", vbOKOnly
Target.Value = Date
Application.EnableEvents = True
Exit Sub
End If
Range(Cells(Target.Row, 1), Cells(Target.Row, 1)).Value = Date
Application.EnableEvents = True
End Sub

This will fire when anything is changed in the sheet, therefore it is really
only practical for data entry. It would need far more refining if lots of
deleting of rows, etc was to take place.

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"ArtŪ" wrote in message
...
Is it possible to create a spreadsheet so that everytime someone edits any
cell in a particular row, a date is either inserted (or edited) in a
column in that row with the current date of the edit?

Example: before edit
Date Data1 Data2 Data3
09/04/04 abcde 12345 xyz321


Example: after edit
Date Data1 Data2 Data3
09/20/04 abcde 54321 xyz321

Art
West Palm Beach