|
|
|
EXCEL Scheduler
Rev 7.1
12/02 By Dave Hagemann Custom Computer Systems www.davidhagemann.com Important note - A change has been made at Rev 7 where XLSCHED no longer closes Excel. You now do it using the Application.Quit in your procedure. XLSCHED allows you to schedule EXCEL to run, load your EXCEL workbook, run your AUTO_OPEN macro or procedure and when it is finished, close EXCEL. In your macro, use Application.Quit to close Excel when the procedure is finished. An example workbook has been included called XLSCHED.XLS. The sample workbook has a procedure called YOURMACRO. It also shows you how you can save your file using the date and hour as a filename. To use the example, enter the time you want in the “Run time” text box. One minute from the current time will work well. Make sure your Path and file to load is correct. When Excel loads with the file XLSCHED.XLS, press the GO button. Cell A1 will count from 1 to 500, Excel will save the file with the date and hour as a file name, then procedure closes excel. Try this again, only this time, look at the procedure in module1 to see how it is done (read the comments). By naming the procedure AUTO_OPEN, it will automatically run when the file is loaded.
Path to EXCEL: This was changed at rev 6.0. You no longer specify the path to Excel. You must now associate the .XLS extension to your application Excel. Path and file to load: In this box, enter the complete path and filename to load into Excel. Included the .xls extension. Frequency: Choose how often you want your Excel application to run. The choices are: “Multiple runs Daily” - This allows you to run your applications as many times in one day as you would like. You enter times into a list box and your app will run at those times every day. “Daily” - This allows your application to run once a day at a time you specify in a text box. "Weekdays (M-F only)” - This will run your application each week day ( Monday through Friday). It will not run on the weekends. You also specify the time to run in the text box. “Weekly” - This will run your application once a week on the day that you specify in another combo box that appears. You also specify the time to run in the text box. “Monthly” - This will run you application once a month at the time you specify in the text box. Another combo box will appear where you choose from the “1st Day” of the month or the “1st Monday”, “1st Tuesday” ... thru “1st Sunday”.
Run time: Enter the time you want the application to run. Run Application
Minimized - This will cause
your Excel application to run as an Icon. Run Application Normal - This will cause your application to run in the Normal size. Make Invisible Now -
Clicking on this option button will cause XLSCHED to go invisible
right now. The user then has no
access to the program. XLSCHED will show in the task list and can be ended there.
The next time XLSCHED is loaded it will be visible. Scheduler Start Invisible - If this checkbox is checked, when XLSCHED.EXE is executed it will run invisible and the user will not be able to change anything. Once this has been checked, the only way to make XLSCHED visible is to go into the file XLSCHED.CFG with an ascii text editor and change the parameter “Startup = 1 (0-Visible, 1-Invisible)” to “Startup = 0 (0-Visible, 1-Invisible)”. Scheduler Keep Records - If this checkbox is checked, XLSCHED will keep a log of when the program XLSCHED is started, when it runs your application, and any errors encountered. The file is called “XLSCHED.LOG” and will be located in the same directory as XLSCHED.EXE.
Below is the file XLSCHED.CFG. It contains the current cofiguation of XLSCHED. When changes are made in XLSCHED they are written to this file. This file is read when XLSCHED is executed. If you make changes in this file, the next time XLSCHED loads, XLSCHED will use the new infomation.
EXCEL Scheduler Configuration File EXCEL path = No longer used. Associate .XLS with Excel. EXCEL file = C:\XLSCHED\XLSCHED.XLS Frequency = 1 (0-Multiple Runs Daily, 1-Daily, 2-Weekly, 3-Monthly, 4-Weekdays (M-F only)) Startup = 0 (0-Visible, 1-Invisible) Keep record= 1 (0-No records, 1-Keep records) Window mode= 1 (0-Run minimized, 1-Run normal) Run time = 8:00
|
|
Send mail to david@davidhagemann.com with
questions or comments about this web site.
|