In my PERSONAL.xls, I have a macro (format()) which performs some general formatting.

I have another file "A_FILE.xls" which contains a query of a database, and after the background refresh it calls the format()macro in my personal.xls

All the above works correctly when I manually upon the A_FILE.xls (via a double-click) and run the query, which then invokes the format()macro in the personal.xls file.

However, since I need to perform this on a daily basis, I created a Window scripthost .vbs file which I want to run as a 'scheduled - task' to perform this database extraction in the background.

PROBLEM:
The Windows script does open the "A_FILE.xls in the background as well as the query, but when it attempts to run the format()macro in my PERSONAL.xls file, the PERSONAL.xls file is not part of the applications project(s).

How do I get this PERSONAL.xls file to load-in during this run, so that I can gain access to my format()macro.


Thanks

jay

<code>
********************
* vbs script *
* *
* Opens A_File ===========> A_File
* * ********************
* Run A_File Macro =========> * Macro() *
* * * *
* * * background query *
* Close A_File * * *
******************** * Call personal.xls*
* format() macor *
* | *
* | *
*********|**********
|
|
|
|
V
****************
* personal.xls *
* *
* format() *
* *
****************
</code>