Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Detect Excel was started with Windows Task Scheduler
Using Excel 2000 to 2003.
I need to somehow detect that Excel was started with the Task Scheduler. I don't need to open any particular workbook, but Excel has an add-in installed that will open (but load, so tick under Tools, Add-ins) an other add-in. This second add-in will run code with the workbook Open event. This code should only run though if Excel was started with the scheduler. I have found only solution sofar, which involves opening a workbook with the /p flag with a directory as an argument but this doesn't work. Thanks for any advice with this tricky problem. RBS |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Detect Excel was started with Windows Task Scheduler
Found a solution to this.
Maybe not the nicest one (the Windows task won't show the Excel icon), but it works. The Windows task will start a .bat file with this text: @echo off %1test c:\zzzzz.txt start Excel exit My add-in will check for the presence of this file and if it is there kill it and run the code. Will be interested if somebody has a better solution. RBS "RB Smissaert" wrote in message ... Using Excel 2000 to 2003. I need to somehow detect that Excel was started with the Task Scheduler. I don't need to open any particular workbook, but Excel has an add-in installed that will open (but load, so tick under Tools, Add-ins) an other add-in. This second add-in will run code with the workbook Open event. This code should only run though if Excel was started with the scheduler. I have found only solution sofar, which involves opening a workbook with the /p flag with a directory as an argument but this doesn't work. Thanks for any advice with this tricky problem. RBS |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Getting Task Scheduler To Use Current Excel Session When Opening F | Excel Discussion (Misc queries) | |||
Can I add files to the getting started task pane in Excel? | Excel Discussion (Misc queries) | |||
Stop Getting Started task pane from launching in Excel | Excel Discussion (Misc queries) | |||
Excute a Excel worksheet with Task Scheduler | Excel Programming | |||
Excel 2002 / XP - Running .XLS with Macros via Task Scheduler | Excel Programming |