Parsing Shell Command with Parenthesis

  • Thread starter Thread starter GarethG
  • Start date Start date
G

GarethG

This is how I would execute the following in a .BAT file:

"N:\Apps\Opera Reports\Office\MSACCESS.EXE" K:\ExpCurMonth.mdb /x
"Autorun"

However, if I try to use
Shell("<Above Line>", 0)

in VBA it moans about the ".

For now I just call the .Bat file, but the zero hides the command
prompt window and not the Access window.

I want to run the above command line and also hide the Access window
using zero in the shell command.

Any takers?
 
"N:\Apps\Opera Reports\Office\MSACCESS.EXE K:\ExpCurMonth.mdb /x
""Autorun"""

Would be my guess although I don't know why autorun would need to be in
quotes. If not, you can try:

"N:\Apps\Opera Reports\Office\MSACCESS.EXE K:\ExpCurMonth.mdb /x Autorun"

Adjust spacing for the /x Autorun to what it should be - it word wrapped in
your email, so I don't know what it should be.
 
Back
Top