View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Denis[_4_] Denis[_4_] is offline
external usenet poster
 
Posts: 38
Default How to pass parameters to excel from wscript (Windows script)

I have a windows script (wscript.exe) that I use to call excel from a batch script. Now I have an excel application where I need to pass in an excel parameter using this wscript. I understand parameters can be passed in via the /e tag (eg, /e/parm1/parm2/...) but I don't know how I can do this from the wscript. Unfortunately, I haven't been able to find anything by googling or searching this group. Anybody know how to do this?

Here's my wscript:

Dim xlApp

Set xlApp = CreateObject("Excel.application")

Set xlWb = xlApp.workbooks.Open("c:\somedir\...\some.xls")

xlApp.Quit

Set xlWb = Nothing
Set xlApp = Nothing

Denis