Beanie posted on June 10, 2009 15:37

This code puts a time date stamp on a row in excel. All you need to do is put the code below in the worksheet code view of the worksheet you want to date stamp.

How it works:

Line 3 checks for column 1 (in this case) being change, you can set this to any column(s) you like, just not the same one as you date stamp.

Line 5 puts the date in the column 1 along (in this case) from the edited column

   1:  Private Sub Worksheet_Change(ByVal Target As Range)
   2:  On Error Resume Next
   3:      If Target.Column = 1 Then
   4:          Application.EnableEvents = False
   5:          Target.Offset.Offset(0, 1) = Now()
   6:          Application.EnableEvents = True
   7:      End If
   8:  End Sub

That should have it working, you might need to make sure the format of the column is correct to show the date in the right format and that the column is big enough to show it.


Posted in: Development  Tags: , ,

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Comments

Page List

Search Blog

Tag Cloud

Recent Comments

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2012 Beanie