+ Reply to Thread
Results 1 to 3 of 3

Connecting VBA macro to OS Task Scheduler

  1. #1
    Registered User
    Join Date
    03-19-2010
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2003
    Posts
    1

    Connecting VBA macro to OS Task Scheduler

    Hi Expert programmers,

    I have a one button macros VBA that resides in Excel 2007 which i ran every week. Now since there's no other tasked aside from pushing that one button every-week and let it finished I want to further automate it using Operating System Task Scheduler (Win7).

    Is this viable?

    If yes, could you please guide me where to start researching for answers.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Connecting VBA macro to OS Task Scheduler

    Welcome to the forum.

    I don't have Win7, but in XP, you'd schedule the workbook in Control Panel > Scheduled Tasks, and kick off the macro in the Workbook_Open event.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187

    Re: Connecting VBA macro to OS Task Scheduler

    I would have thought it is possible, although I haven't used Excel as a scheduled task.

    1. you need to make the "click of the button" unnecessary. So put some code in the workbook_open event to run the same code as the button click.

    2. log on as an administrator . Control panel and scheduler.
    It is best to create a new folder in the scheduler. There is quite a lot to fill in but it is all fairly self explanatory. The spreadsheet goes in under actions.

    3. give it a whirl.

    Let me know how you get on.



    click on the * Add Reputation if this was useful or entertaining.

+ 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