antifashionpimp
Registered User.
- Local time
- Today, 17:43
- Joined
- Jun 24, 2004
- Messages
- 137
Hi,
Please help me as I am a newbie in VB, pretty much in all programming.
I searched many forums before, but do not know exactly what keywords to use. I hope my question makes sense.
I have the following Sub, which calls an .exe program.
Now what I need, is for the value which is returned by the .exe program to be captured by Visual Basic. I normally run this program in the command prompt, with the arguments, and when pressing Enter, the answer is displayed on the following line in the command prompt.
Does this involve reading the stream "stdout". If yes, how do I do it in Access VB?
Regards,
J
Please help me as I am a newbie in VB, pretty much in all programming.
I searched many forums before, but do not know exactly what keywords to use. I hope my question makes sense.

I have the following Sub, which calls an .exe program.
Code:
Private Sub cmdCalc_Click()
On Error GoTo Err_cmdCalc_Click
Dim stAppName As String
Dim stArgument As String
stAppName = "C:\Program Files\prog.exe"
stArgument = " " & Me.cboAge& " " & Me.cboSex
Call Shell(stAppName & stArgument, 1)
Exit_Calc_Click:
Exit Sub
Err_cmdCalc_Click:
MsgBox Err.Description
Resume Exit_cmdCalc_Click
End Sub
Now what I need, is for the value which is returned by the .exe program to be captured by Visual Basic. I normally run this program in the command prompt, with the arguments, and when pressing Enter, the answer is displayed on the following line in the command prompt.
Does this involve reading the stream "stdout". If yes, how do I do it in Access VB?
Regards,
J