Shell command produces a "Run-time error '5': Invalid procedure call or argumen

Joined
Feb 13, 2018
Messages
3
Reaction score
1
I cannot figure out the Shell command in a Word subroutine produces a "Run-time error '5': Invalid procedure call or argument"

The last two lines of my vbscript are:
Msgbox strCmd
RetVal = Shell(strCmd, 1)

The following is the text string that appears in the msgbox:
"e:\Apps\UtilitiesByMarc\inputBox wscript.popup_aaa.vbs" "e:\zmani\2018-5-13-17-34-21-0.7055475.txt" 8 "subPopupMsg_MultiLineMsg_Test" "0"

If I open a DOS window and paste that text string into it, the command line works perfectly.
So why does the last line of my script produce a "Run-time error '5': Invalid procedure call or argument"?
 

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