+ Reply to Thread
Results 1 to 11 of 11

Run a macro automatically every 24 hours

  1. #1
    Forum Contributor
    Join Date
    05-19-2012
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    200

    Run a macro automatically every 24 hours

    How do I run a macro automatically every 24 hours? What's the code? And where do I put it in the code, at the end of the macro, right? (and I wanna be able to change it to whatever interval I like, 12 hours, hourly, etc)

    Thanks!
    Last edited by nenadmail; 08-01-2012 at 07:20 AM.

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Run a macro automatically every 24 hours

    You'd put it in the workbook open sub and set a scheduled task from within windows.

  3. #3
    Forum Contributor
    Join Date
    05-19-2012
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    200

    Re: Run a macro automatically every 24 hours

    Can you guide me... I don't know how to schedule a task within windows...????

    ---------- Post added at 06:37 AM ---------- Previous post was at 06:24 AM ----------

    So, there's no micro code that can do it? The only way is to "schedule a task"???

  4. #4
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Run a macro automatically every 24 hours

    Well it depends if you have to have your workbook open 24/7. If you do then yes, but if you don't how will your workbook execute the code if it isn't open?

  5. #5
    Forum Contributor
    Join Date
    05-19-2012
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    200

    Re: Run a macro automatically every 24 hours

    Right... yes.. that's the case, it's open 24/7.

  6. #6
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Run a macro automatically every 24 hours

    Have a look at Application.Ontime

  7. #7
    Forum Contributor
    Join Date
    05-19-2012
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    200

    Re: Run a macro automatically every 24 hours

    where do I look? What is that? Please understand I'm not a programmer... I just know how to copy paste code. If you can please provide a code for me, that would be the best... Thanks!

  8. #8
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Run a macro automatically every 24 hours

    How can I provide some code when you haven't provided any?

    Google it or open up the help feature, it's extremely straight forward, but this should get you going:
    http://www.ozgrid.com/Excel/run-macro-on-time.htm

  9. #9
    Forum Contributor
    Join Date
    05-19-2012
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    200

    Re: Run a macro automatically every 24 hours

    Thanks... but that's like a foreign language to me... here's the code I want to have repeated:

    Please Login or Register  to view this content.
    P.S. Initially, I thought it's just one or two lines of code I can just paste in here... that's why I didn't provide the code originally.

  10. #10
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Run a macro automatically every 24 hours

    I think you want:
    Please Login or Register  to view this content.

  11. #11
    Forum Contributor
    Join Date
    05-19-2012
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    200

    Re: Run a macro automatically every 24 hours

    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)

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