command line coding

S

Stanley

I run the following code from a command button and I have no problem opening
up HSFinancialMgt.mdb. The problem is I want to add
a command line function to this and I don't know how to code it.

Shell """C:\Program Files\Microsoft Office\Office10\MSAccess.exe"" " &
"""c:\HomestayDevelopmentNY\HSFinancialMgt.mdb""", vbNormalFocus

I can put the following code into the run box and have no problem. How can I
get this into my program code?

"C:\Program Files\Microsoft Office\Office10\MSAccess.exe"
"c:\HomestayDevelopmentNY\HSFinancialMgt.mdb" /cmd 12345

I think this is a matter of setting quotations marks, but I tried everything
with no success.
Thanks,
Stan
 
D

Dirk Goldgar

Stanley said:
I run the following code from a command button and I have no problem
opening
up HSFinancialMgt.mdb. The problem is I want to add
a command line function to this and I don't know how to code it.

Shell """C:\Program Files\Microsoft Office\Office10\MSAccess.exe"" " &
"""c:\HomestayDevelopmentNY\HSFinancialMgt.mdb""", vbNormalFocus

I can put the following code into the run box and have no problem. How can
I
get this into my program code?

"C:\Program Files\Microsoft Office\Office10\MSAccess.exe"
"c:\HomestayDevelopmentNY\HSFinancialMgt.mdb" /cmd 12345

I think this is a matter of setting quotations marks, but I tried
everything
with no success.


Try:

Shell _
"""C:\Program Files\Microsoft Office\Office10\MSAccess.exe"" " & _
"""c:\HomestayDevelopmentNY\HSFinancialMgt.mdb"" /cmd 12345", _
vbNormalFocus
 

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