D
Daniel
Guest
Hi everybody,
After many trials and errors I finaly wrote a VB script which works (see
below), to automatically run Excel and open a specific worksheet at startup.
This worksheet contains an Auto_open macro that performs a few tasks.
Now, I would like to add some code in my VB script to automatically save
that worksheet and close Excel.
How could I do that ? Whatever I tried failed.
Many tks in adavance for your time and kind help.
With best regards,
Daniel
Here is my actual script :
---------------------------------
Wscript.Sleep (10000)
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run """Excel.exe"" ""C:\Documents and Settings\My
documents...\MyFile.xls"""
Wscript.Sleep (10000) 'délai de 10 secondes avant de fermer
[Code to save worksheet and close Excel]
-----------------------------------
After many trials and errors I finaly wrote a VB script which works (see
below), to automatically run Excel and open a specific worksheet at startup.
This worksheet contains an Auto_open macro that performs a few tasks.
Now, I would like to add some code in my VB script to automatically save
that worksheet and close Excel.
How could I do that ? Whatever I tried failed.
Many tks in adavance for your time and kind help.
With best regards,
Daniel
Here is my actual script :
---------------------------------
Wscript.Sleep (10000)
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run """Excel.exe"" ""C:\Documents and Settings\My
documents...\MyFile.xls"""
Wscript.Sleep (10000) 'délai de 10 secondes avant de fermer
[Code to save worksheet and close Excel]
-----------------------------------