+ Reply to Thread
Results 1 to 7 of 7

Managing TIme Accuracy

  1. #1
    Forum Contributor
    Join Date
    07-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    476

    Managing TIme Accuracy

    Hi,

    I have a toggle button on a spreadsheet. I hit it and store Date + Time / Now in a variable then when I hit it again I store time in another variable. For some reason I cannot get this to accurately capture the time. It is accurate technically but, I lose 2 seconds just in "Excel thinking". I've turned off all the code event hadnling and Its 2 seconds just to toggle on update screen and toggle off. If I turn off screenupdating and events I'm up to 3 seconds.

    Anyone have any ideas on eliminating just this "cycle" time?

  2. #2
    Registered User
    Join Date
    12-17-2016
    Location
    South Wales
    MS-Off Ver
    Excel 2007, 2016
    Posts
    68

    Re: Managing TIme Accuracy

    Is there anything else in the VBA code prior to the time being written to the variable that might cause a recalculation? If so, could the code be rewritten to put the writing to variable first?

  3. #3
    Forum Contributor
    Join Date
    07-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    476

    Re: Managing TIme Accuracy

    This does help, oddly. Although I have no real calcs running, turning calcs to manual before hand gets me down to 1 sec of "missing" time.

  4. #4
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Managing TIme Accuracy

    .
    .
    This small project uses a UserForm and CommandButtons. The "time stamp" is instantaneous.

    Wonder if your Toggle Button has something to do with the time lag ?

    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    07-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    476

    Re: Managing TIme Accuracy

    Yeah, sadly looks like it's something with the toggle button. I cannot get it to zero. Excel x VBA is a frustrating mistress

  6. #6
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Managing TIme Accuracy

    What is your code?
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  7. #7
    Forum Contributor
    Join Date
    07-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    476

    Re: Managing TIme Accuracy

    That's hard to explain, in short too much, but it runs in less than a sec. Workbook is too much to post here and if I scale it down won't make sense. I think I'm going to chalk it up to the laws of physics for now. Thanks for your help

+ 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. To Calculate Accuracy %
    By Basavaraj K S in forum Excel - New Users/Basics
    Replies: 9
    Last Post: 02-01-2015, 11:37 AM
  2. Replies: 3
    Last Post: 11-24-2012, 03:19 PM
  3. Hi - I'm new (an industrial designer) managing time sheets
    By wilsondesign in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 10-13-2012, 12:15 AM
  4. [SOLVED] Number Accuracy
    By StevenAlberta in forum Excel General
    Replies: 3
    Last Post: 07-23-2012, 08:27 PM
  5. Replies: 0
    Last Post: 07-12-2012, 12:47 PM
  6. Checking accuracy
    By schlempyasst in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-13-2005, 03:18 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