How can I pass a string variable from one EXE file to another?
Printable View
How can I pass a string variable from one EXE file to another?
are you talking about passing a string to an exe at startup or passing a string to an exe while it's running?
Watch this forum.. :) http://forums.vb-world.net/showthrea...threadid=15707
I want to pass the string across at startup
I guess you mean command line arguments. It is quite simple to get these back.
so if you called your program like thisCode:Dim sBuffer As String
sBuffer = Command
sBuffer would contain "test command"Code:myProg.exe test command
Hope this helps.
[Edited by Iain17 on 05-04-2000 at 03:27 PM]
so you want one program to launch another program with certian command line arguments? If that's the case then just use the Shell() command to do this. You'd format it just like you were typing it in the run box or at a command line.. or how it's set up in a shortcut..
Shell("c:\myprogram\myprogram.exe /s")
use vars if you want
Dim program as String
Dim switches as String
program = "c:\myprogram\myprogram.exe"
switches = "/s"
Shell(program & " " & switches)