Results 1 to 3 of 3

Thread: Time Stamp

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2003
    Posts
    27

    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

  2. #2
    Lively Member amer7862000's Avatar
    Join Date
    Apr 2004
    Location
    North West, UK
    Posts
    94
    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"

  3. #3
    Lively Member TheFIDDLER's Avatar
    Join Date
    May 2002
    Location
    here and there and far away
    Posts
    126
    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
  •  



Click Here to Expand Forum to Full Width