+ Reply to Thread
Results 1 to 6 of 6

Automated Macro Based on Timer Doesn't Kick Off

  1. #1
    Registered User
    Join Date
    05-21-2014
    Posts
    22

    Automated Macro Based on Timer Doesn't Kick Off

    I setup a timer in a macro that I kickoff before I leave.

    Application.OnTime TimeValue("05:00:00"), "AutoRunUpdate"

    I already tested it and it seemed to work during the day. I basically just set the timer to kick off 2-3 mins after I press the button that contains this macro. It worked fine but when I do it at the end of the day before I leave, it doesn't run the folllowing morning. The macro should kick off at 5:00 AM.

    Any suggestions? Does the process get killed after some time?

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

    Re: Automated Macro Based on Timer Doesn't Kick Off

    Can you attach an example?
    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
    05-21-2014
    Posts
    22

    Re: Automated Macro Based on Timer Doesn't Kick Off

    It's quite simple. I have a button that runs the Kickoff function and leave the Workbook open overnight. I cannot schedule the Windows Scheduler to open the Workbook. Does the OnTime process get cancelled? Maybe it doesn't work when the screen is locked? How about if Excel is "Calculating" cells that could be conflicting with the OnTime process? Any help is appreciated.

    Sub Kickoff()
    Application.OnTime TimeValue("05:00:00"), "AutoRunUpdate"
    End Sub

    Sub AutoRunUpdate()
    ....rest of code...
    End Sub

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

    Re: Automated Macro Based on Timer Doesn't Kick Off

    Is it on a button click? If youre opening the workbook, you'll need this in the Workbook_open() event.

  5. #5
    Registered User
    Join Date
    05-21-2014
    Posts
    22

    Re: Automated Macro Based on Timer Doesn't Kick Off

    It's in a button click. I'm not opening the workbook. I leave the workbook open overnight. I click the button and it runs. When I set it up to run 2-3 mins, it works but when I set it for 5 AM overnight, it doesn't.

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

    Re: Automated Macro Based on Timer Doesn't Kick Off

    Can you attach the workbook?

+ 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. Replies: 2
    Last Post: 12-27-2013, 01:12 PM
  2. Automated Macro - Update Pivot based on sheet1
    By minister in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-24-2013, 08:40 AM
  3. Replies: 1
    Last Post: 12-12-2012, 08:46 PM
  4. [SOLVED] Creating a macro (or module) to modify a cell's value based on automated entries
    By Julez80s in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-22-2012, 01:51 PM
  5. [SOLVED] VBA Code to kick off macro when workbook command to close is initi
    By zulfer7 in forum Excel General
    Replies: 2
    Last Post: 06-23-2006, 03:10 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