Ok, some workbooks I have to open with a specail instence of excel called the Bex Analyzer:
"C:\Program Files\SAP\Business Explorer\BI\BExAnalyzer.ex
If I have this Bex Excel open and I double click this file:
C:\Documents and Settings\SCUAP\Desktop\bex
It opens the file in the Bex instance of excel which is what I want.
But if I leave Bex Excel open and schedule an XP task to open the file, the task scheduler opens the file in it's own instance of regular Excel, this is no good, I need it to open the workbook in the Bex instance of Excel I already have running.
So my next thought is to have the task scheduler open a .vbs file that will duplicate exactly what happens when I double click the file with Bex Excel already running. How to write the .vbs file? I tried the code attached but it just vaporized the file I was trying to open???
dim ws, file_to_open_path, Bex_Path
Set ws = WScript.CreateObject("WScript.Shell")
Bex_Path = "C:\Program Files\SAP\Business Explorer\BI"
file_to_open_path = CHR(34) & "C:\Documents and Settings\SCUAP\Desktop\bex test server.xls" & CHR(34)
ws.Run CHR(34) & Bex_PATH & "\BExAnalyzer.exe" & CHR(34) & file_to_open_path, 0, "FALSE"