+ Reply to Thread
Results 1 to 1 of 1

Time/Date Function

  1. #1
    Registered User
    Join Date
    01-19-2013
    Location
    salt lake city, utah
    MS-Off Ver
    Excel 2003
    Posts
    18

    Time/Date Function

    Hey,

    I am trying to make two buttons that time stamp the amount of time someone is working on a particular spreadsheet. I want there to be two buttons (start, and stop) with macros attached that stamp the current date and time automatically. Any help would be greatly appreciated.. The excel I'm working with is an older version (2003, I know- its just what they use at the office) thanks!

  2. #2
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Time/Date Function

    a couple of questions
    1 - want the user to click on these buttons - showing start and stop?
    2 - Where do you want to put the start and stop times?

    thanks
    Ernest

    Please consider adding a * if I helped

    Nothing drives me crazy - I'm always close enough to walk....

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Time/Date Function

    You could use the Open and close workbook events to measure from the time the workbook is opened to when it is closed.
    Open the VBA editor (ALT F11). Double click on "This Workbook" in the project explorer on left and paste this code or something like it into the Text box.
    Please Login or Register  to view this content.
    See attachment. Would that work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Forum Contributor ragavan.sridar1's Avatar
    Join Date
    11-19-2012
    Location
    India
    MS-Off Ver
    Excel 2010, Excel 2003
    Posts
    208

    Re: Time/Date Function

    you can also try this, this will help you to add the start time and end time.

    This will add the start time in column A and end time in column B, if the user clicks the button.

    Please Login or Register  to view this content.
    Thanks!
    Raga.

    Please,mark your thread [SOLVED] if you received your answer.

    Click the little star * below, to give some Rep if you think an answer deserves it.

    I learnt so many things from these links.

  5. #5
    Forum Contributor ragavan.sridar1's Avatar
    Join Date
    11-19-2012
    Location
    India
    MS-Off Ver
    Excel 2010, Excel 2003
    Posts
    208

    Re: Time/Date Function

    you can also try this, this will help you to add the start time and end time.

    This will add the start time in column A and end time in column B, if the user clicks the button.

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1