Hi Alexa,
I would suggest doing all processing in the Excel workbook instead of trying
to control Excel via the command line.
To open an Excel workbook, you can just enter the full path/filename for the
file into your batch file.
In the Workbook_Open event subroutine for your workbook, you can call a
subroutine to do what you need to do. At the end of the subroutine, do
this:
ThisWorkbook.Save
Application.Quit
In order for this to work unattended, you'll either have to:
1) set your macro security to low (not recommended)
or
2) sign the workbook with selfcert.exe (available on the MS site somewhere)
so it will be trusted
--
Regards,
Jake Marx
MS MVP - Excel
www.longhead.com
[please keep replies in the newsgroup - email address unmonitored]
alexa wrote:
I am a beginner programmer and have never created a .bat
file. Although I have "some" prior knowledge of VB.
I am in need of creating a bat file (or something
comparable) that I can put into Scheduler to run every
morning.
The idea is to open Excel (Excel is set up to open the
file automatically), pause for 30 seconds (an automatic
update happens during this time), save the file
(overwrite), and then close Excel.
I have not been successful finding switches for Excel
(start it, save and close). Any switches, examples or
ideas you can provide would be extremely helpful. Thanks,
Alexa