Results 1 to 3 of 3

macro stops at midnight

Threaded View

  1. #1
    Registered User
    Join Date
    03-27-2013
    Location
    New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    2

    macro stops at midnight

    Hi,
    I am using the following code to periodically pause a macro. The problem is, as the system clock runs through midnight, the macro stops working. Any idea of a way to be able to pause through midnight and continue to run later?
    Thanks!

        PauseTime = 3    ' Set duration.
        Start = Timer    ' Set start time.
        Do While Timer < Start + PauseTime
            DoEvents    ' Yield to other processes.
        Loop
        Finish = Timer    ' Set end time.
        TotalTime = Finish - Start    ' Calculate total time.
    Last edited by JBeaucaire; 03-27-2013 at 02:38 AM. Reason: Added CODE tags. as per forum rules. Don't forget!!

Thread Information

Users Browsing this Thread

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

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