View Full Version : Shell Function


Paul F
11-11-1999, 11:05 AM
I'm trying to start an IBM Client Access exe using the Shell Function. I've tried a variety of things and keep getting Invalid Procedure Call or Argument error. If I copy the pathname from the value in the debug window and paste it into run I can start the function, so its not a typo. The macro line is:-
hMod = Shell("C:\PROGRA~1\IBM\CLIENT~1\cwbtf.exe")
If I try to run explorer or excel it works fine. What am I missing? Is there something in the registry that must be set?

Thanks

cpuSmoker
01-23-2005, 07:29 PM
Are you sure of the Ms-DOS style filepath? It doesnt have to be a ~1. It can be a ~2 or ~9. It also isnt necessary for the shell command. It does support long filenames.

IE: C:\Program Files\IBM\Client Connect Software\cwbtf.exe

You can manually type this it in like the example, or it may be simpler in the debugging phase to set the filepath to a variable and then call the shell command.

Example:
Dim myPath as string
mypath = "C:\Program Files\IBM\Client Connect Software\cwbtf.exe"
shell myPath