Opening up a Emulator

G

Guest

I am trying to use the Shell Function. I know that the Shell function opens
up a .exe file but what if you have to open up a exe file plus a setting for
that exe file.

Pcomm = Shell("C:\Program Files\IBM\Personal Communications\pcsws.exe")

This works but when it opens the exe file it asks for some settings and then
it will not work.

The Shortcut for the exe in the target:
"C:\Program Files\IBM\Personal Communications\pcsws.exe" "C:\Program
Files\IBM\Personal Communications\tn3270-Boston.ws"

I need to put the tn3270-Boston.ws in the Shell some how?

Thank you
 
S

Stefan Hoffmann

hi,
The Shortcut for the exe in the target:
"C:\Program Files\IBM\Personal Communications\pcsws.exe" "C:\Program
Files\IBM\Personal Communications\tn3270-Boston.ws"

I need to put the tn3270-Boston.ws in the Shell some how?
Go google for "ShellExecute". Imho there was a code sample in mvps.org.
You will also find it in the archives.


mfG
--> stefan <--
 
D

Douglas J. Steele

Try:

Shell("""C:\Program Files\IBM\Personal Communications\pcsws.exe""" & _
"""C:\Program Files\IBM\Personal Communications\tn3270-Boston.ws""")

Hopefully that'll survive word-wrap... If not, you're putting 3 double
quotes at the very beginning, 2 double quotes after the .exe, a space, 2
double quotes before the next C:\Program ... and 3 double quotes at the very
end. (Since I was using the line continuation character, I've got 3 double
quotes in the middle)
 
G

Guest

You are very good and that is why you are a MVP. It worked great.

Thank you Douglas J. Steele
 

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