View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tyla Tyla is offline
external usenet poster
 
Posts: 29
Default Reading command line parameters in a VBA program

You can't pass parameters to Excel VBA macros from the command line,
unfortunately. Have you tried putting the parameters in a simple text
file -- or the Windows Registry -- and having your VBA macro read them
from there?

/ Tyla /

On Apr 17, 8:02 am, dq wrote:
Hallo everybody,

I have an Excel VBA macro that I run several times per day to generate
certain reports. To have this done fully automatic I need to be able
to launch the program with a commandline that looks like
...\ReportGenerator.xls /List=1000 /Date=Today
How can I read the parameter(s) '/List=1000 /Date=Today' in my
program. I find no property that returns this string.

Thanks to anybody who can help me because I've been looking for a
solution for quite some time now.

DQ