PDA

Click to See Complete Forum and Search --> : Time Stamp


Everx Moorx
Apr 13th, 2004, 04:33 PM
Hey Guys,

Does anyone know how to time stamp a cell just by clicking on it?

I had some code that looks like this but this doesn't work:

Private Sub Worksheet_Change(ByVal Target As Range)
Range("A" & Target.Row) = Now()
End Sub

Any suggestions on this, will be greatly appreciated.

Ever :(

amer7862000
Apr 13th, 2004, 06:36 PM
why do u call the function from a command button... looks more professional than havin a click on a cell; to time stamp...

TheFIDDLER
Apr 13th, 2004, 07:28 PM
Try the following:
This works for me.

[Highlight=VB]
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Excel.Range)

Range("A" & Target.Row) = Now()
End Sub

[\vbcode]


Neat little bit of code - will have to remember this one!