+ Reply to Thread
Results 1 to 4 of 4

Adding a stopwatch with lap times using a macro

  1. #1
    Registered User
    Join Date
    06-13-2012
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2010
    Posts
    13

    Adding a stopwatch with lap times using a macro

    Hi there,

    I want to create a stopwatch with the ability to record lap (interval) times in an excel worksheet.

    I have tried numerous codes but none seem to work…the one which seems most logical to me is included in the attached document. Basically, when the 'start' button is clicked, I want the current time to be recorded in column F. Ideally, the lap (interval) will also be included in the column next to it (column G).

    If anyone can help it would be much appreciated

    Cheers,
    tb13
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Adding a stopwatch with lap times using a macro

    End(x1Up) should be End(xlUp)

    You are also using a reserved keyword, range in your code.

    What you've done looks ok. Your laptim will be current time - the time started.
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  3. #3
    Registered User
    Join Date
    06-13-2012
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Adding a stopwatch with lap times using a macro

    cheers.

    it is only the reset button that does not work now, and I think its due to the range. What do you mean by a 'reserved keyword'?

  4. #4
    Forum Contributor
    Join Date
    12-27-2012
    Location
    cebu, Philippines
    MS-Off Ver
    Excel 2016
    Posts
    210

    Re: Adding a stopwatch with lap times using a macro

    a reserved keyword in excel vba is a keyword that has its own meaning in the language... nathansav means you have to change that reserved keyword - name it something else..
    don't worry, there's a lot of people that are far more confused than you
    but if you liked what i suggested. Click for me the "Add Reputation" - that way, we'd be both happy.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Macro excel stopwatch
    By johnsmith100 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-25-2015, 04:00 AM
  2. [SOLVED] Macro for multiplying the # of rows 3 times and adding add. information in new column
    By Donata in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-13-2013, 01:07 AM
  3. Using Stopwatch to Record Split Times Question
    By jtrue in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-22-2012, 02:03 AM
  4. Condensing a repetitive If formula based on stopwatch times
    By Squirrel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-25-2011, 11:45 AM
  5. How do I set up stopwatch racing times in Excel?
    By Armand in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-07-2006, 08:55 PM

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