|
-
May 3rd, 2000, 07:26 PM
#1
Thread Starter
Hyperactive Member
How can I pass a string variable from one EXE file to another?
Thanks in advance for any help provided.
VB 6 Enterprise Edition SP4
ADO, SQL 7/2000, ASP and some JavaScript

>> Life goes on, but for how long? <<
If you can smile when things go wrong, you have someone in mind to blame
-
May 3rd, 2000, 07:32 PM
#2
Lively Member
are you talking about passing a string to an exe at startup or passing a string to an exe while it's running?
-
May 3rd, 2000, 07:45 PM
#3
-
May 3rd, 2000, 09:16 PM
#4
Thread Starter
Hyperactive Member
I want to pass the string across at startup
Thanks in advance for any help provided.
VB 6 Enterprise Edition SP4
ADO, SQL 7/2000, ASP and some JavaScript

>> Life goes on, but for how long? <<
If you can smile when things go wrong, you have someone in mind to blame
-
May 3rd, 2000, 09:26 PM
#5
Fanatic Member
I guess you mean command line arguments. It is quite simple to get these back.
Code:
Dim sBuffer As String
sBuffer = Command
so if you called your program like this
Code:
myProg.exe test command
sBuffer would contain "test command"
Hope this helps.
[Edited by Iain17 on 05-04-2000 at 03:27 PM]
Iain, thats with an i by the way!
-
May 3rd, 2000, 09:42 PM
#6
Lively Member
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)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|