Trouble with Windows 7 Task Scheduler

Discussion in 'Windows 7 Help and Support' started by ryguy7272, Mar 25, 2013.

  1. ryguy7272

    ryguy7272 Well-Known Member

    Joined:
    Mar 25, 2013
    Messages:
    26
    Likes Received:
    0
    I used to work with the Windows Task Scheduler every day, a few years ago; haven’t touched it in a while. So, today, I entered the appropriate info for General, Triggers, Actions, Conditions, Settings, and History. I am trying to open an XLSB file, which contains workbook open code in ‘ThisWorkbook’; code here:
    Private Sub Workbook_Open()
    Call GetFiles
    End Sub

    So, when I double-click the WB it opens just fine, the event triggers the macro, and everything is lovely. I can’t seem to make this work from the Windows Task Scheduler though. Frustrating. I see Excel open in the Task Manager!! For some reason, unbeknownst to me, WTS is NOT controlling the open event of this XLSB WB. Any ideas? Everything seems correct. I don’t get any error message. It seems like it runs, but it actually doesn’t run.

    Thanks everyone!!
     
  2. Mitchell_A

    Mitchell_A Excellent Member

    Joined:
    Feb 7, 2009
    Messages:
    5,068
    Likes Received:
    240
    I don't have much experience with the more complex parts of Task Scheduler but my only thought is you may need to add a parameter to the executable in the properties window.
     
  3. ryguy7272

    ryguy7272 Well-Known Member

    Joined:
    Mar 25, 2013
    Messages:
    26
    Likes Received:
    0
    Well, the parameter is optional. Also, intuitively, it doesn't make sense to me to do this. I don't even know what kind of parameter I would add.

    When the time comes, Task Scheduler opens an instance of Excel, but it will not open the Excel file and thus it will not run my Macro:
    Private Sub Workbook_Open()
    Call GetFiles
    End Sub

    Any other thoughts? Anyone?
     

Share This Page

Loading...