Help: Shell doesn't work

  • Thread starter Thread starter Shirley
  • Start date Start date
S

Shirley

I need your help....

I am trying to open another application---MDE, MDB, Word,
etc---using shell function, but it just doesn't work. The
message says: "invalid procedure call or argument". I am
running Access 2000.

What can I do?

Thanks for your help!

Shirley
 
I am trying to open another application---MDE, MDB, Word,
etc---using shell function, but it just doesn't work. The
message says: "invalid procedure call or argument".

Can you post your code? Shell requires a full command line. Something like

Call Shell("c:\test\somefile.exe thisparam.doc", vbNormal)

If the exe path has spaces in it then you need to double-up on the quotes.

Const Q = """"
accPath="some path\access.exe"
dbPath = "some other path\db.mdb"
dbPath = Q & accPath & Q & " " & Q & dbPath & Q & " /ro /cmd server=" _
& DBServer & " db=" & Database

-- Dev
 
Dev,

I used the exactly the same code like:
Call Shell("c:\test\somefile.exe thisparam.doc",
vbNormal).

I even used the wizard set up---but it still doesn't
work:-(

Shirley
 
Back
Top