+ Reply to Thread
Results 1 to 4 of 4

Auto Run Macro

  1. #1
    Registered User
    Join Date
    01-20-2009
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2003
    Posts
    9

    Auto Run Macro

    Hello All,

    Was wondering if it is possible to automatically run a macro on a schedule?

    I needed to run a simple macro every Saturday @ 11:30PM

    Any help would be appreciated.

    Thanks

    Mo

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Auto Run Macro

    Yes, but the workbook would have to be open, so the macro can fire. You could open a workbook via Windows scheduler and have a macro automatically run with the Workbook_Open event, or use

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-20-2009
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Auto Run Macro

    Thanks for the reply...

    Right now I am using this code, however, I need it only to run on Saturdays.

    And my workbook is always open....

  4. #4
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Auto Run Macro

    you could do the Application.OnTime for the set time, but before you branch off into your code, check if the current date's weekday is a Saturday.

    here's some code to find out today's weekday as a number, i.e. 4 is Wednesday

    Please Login or Register  to view this content.

+ 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