Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shell Compile error calling program from excel VB

Status
Not open for further replies.

searlerm

MIS
Jul 28, 2001
22
0
0
GB
Hi all

I wonder whether anyone can help me with this one please...

I am trying to call an external application from within Excel VB but am getting a "Compile error - Expected list separator or )" message. The command line is as below and I have simply prefixed it with "shell(". The command line works from a run prompt but not within VB - Can anyone kindly assist please?


shell("C:/Program Files/Skyewright/programs/ImportPlus.exe" -action multiple -datatype syma -input ..\import\syma\custom\IBEXSYST-02.syma -mode nosynergy -path3p "X:/L Clients/L Limited/Sagedata/ACCDATA/" -user3p manager)

Many thanks

 
searlerm,
I can't be sure, but my gut tells me it's a syntax error involving the quotation marks. The shell command only has 2 arguments separated by a comma. The first argument, which is the only one you are using, is one text argument not usually having sets of quotation marks. This may sound weird, but try only placing quotation marks in the beginning and at the end of the entire text command and retry. I have something similar and it seems to work then.

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top