Reading command line parameters in a VBA program

D

dq

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
 
T

Tyla

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 /
 
D

dq

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 /






- Tekst uit oorspronkelijk bericht weergeven -

Hallo Tyla,

That is exactly what I do know: a batch file generates a .reg and
loads it into the registry and then launches the Excel program which
reads it back. But this is such a messy way that I was hoping there
was something in VBA itself.

Thanks anyway.

DQ
 
T

Tyla

Bummer, isn't it? Next time I have Bill G. over to lunch, I'll talk to
him about this issue -- one a many I have on my list for him.

/ T /
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top