|
-
Apr 13th, 2004, 04:33 PM
#1
Thread Starter
Junior Member
Time Stamp
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
-
Apr 13th, 2004, 06:36 PM
#2
Lively Member
why do u call the function from a command button... looks more professional than havin a click on a cell; to time stamp...
"Through every dark night there's a brighter day, so no matter how hard it get, put your chest out and keep your head up, and handle it"
-
Apr 13th, 2004, 07:28 PM
#3
Lively Member
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!
-----
#VBA, VB 6 Professional Edition, Office XP Developper. Excel 97, Excel 2000, Excel XP
I miss my VIC 20.
Never should have upgraded to my commodore 64. ...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|