|
-
Mar 22nd, 2000, 09:19 PM
#1
Thread Starter
New Member
I am trying to run this shell command
Shell("C:\FORTRAN\TEST.EXE file1 file2 file3", 1)
file1 and 2 are input files to run the test.exe and the output is printed in file3.
file1,2 are selected from my commondialogbox1.filename
file1=commondialog1.filename
file2=commondialog1.filename
file3=text1.text (out put file)
at the shell command it is not able to read the file1 and file2 to run the exe file.
anyhelp is greatly appreciated
thanks
p1
-
Mar 23rd, 2000, 01:33 AM
#2
Hyperactive Member
Hi p1,
I don't know why it doesn't work, but you can try this:
Command1_Click ()
Dim X
...
X = SHELL(".....)
...
end Sub
Perhaps the 'Dim X' and the 'X = ..' is missing.
Good luck, Matt 
-
Mar 23rd, 2000, 01:36 AM
#3
Lively Member
if file1 and file2 and file3 have values for file names then you probably want to use them rather than hard coding file1,file2 and file3. Like this:
Shell("C:\FORTRAN\TEST.EXE " & file1& " " & file2 & " " &file3, 1)
Better yet concat your command string first and then call SHELL:
dim cmd as string
cmd = "c:\fortran\test.exe " & file1& " " & file2 & " " &file3
shell(cmd,1)
That help?
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
|