View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Auto Update Time When Cell Changes

I just tested this code in xl2002 and it worked just fine. However, it needs
to be put in the worksheet module where you want to run it. Right click
sheet tabview codeput it thereremove from where you put it. SAVE

--
Don Guillett
SalesAid Software

"Anthony" wrote in message
...
Okay, the following code from that site should produce the results I want,
but now I need to know how to activate it... nothing I've tried has
produced
anything but #NAME?.

Using a worksheet event macro.
Let's say that every time an entry is made in cells A2:A10, the
corresponding cell in column B should have the date and time entered. You
could use this Worksheet_Change() macro - put it in the worksheet code
module:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count 1 Then Exit Sub
If Not Intersect(Range("A2:A10"), .Cells) Is Nothing Then
Application.EnableEvents = False
If IsEmpty(.Value) Then
.Offset(0, 1).ClearContents
Else
With .Offset(0, 1)
.NumberFormat = "dd mmm yyyy hh:mm:ss"
.Value = Now
End With
End If
Application.EnableEvents = True
End If
End With
End Sub


"JE McGimpsey" wrote:

Try

http://www.mcgimpsey.com/excel/timestamp.html

In article ,
Anthony wrote:

I have an Excel spreadsheet that multiple people will use.

I would like my date column (H) to automatically update when the users
update any of their numbers (columns D, E, and F) so I can track when
their
last update occured.

I'm sure this would be some form of Worksheet_Change event, but I can't
find
a site that adequately describes events for my skill level.

Thank you,
Anthony