J
Jason
this is just an example i am using to point out, i am trying to open command
prompt, and run something in it from vba.
Private Sub cmd1_Click()
Dim OldPath As String
Dim NewPath As String
a = 13048
b = " VQRUN" & " " & a & ".prn" & " " & a & ".out"
'vqrun is the name of the program that i wanted to run in command prompt
'and 13048.prn and 13048.out are the parameters passed to the application
vqrun.
OldPath = CurDir
NewPath = "C:\VQ80_2\ "
ChDrive NewPath
ChDir NewPath
', now, it opens the cmd prompt with the new path, which is fine(c:\vq80_2),
but now i need to run 'vqrun along wit the parameters'.
i know that the below line is wrong because i cannot simply add 'b', but is
there anyway i could do this?
ret = Shell("c:\winnt\system32\cmd.exe", b)
anyhelp on this is much much appreciated because i have been waiting for the
answer of this question for a long time. cheers.
prompt, and run something in it from vba.
Private Sub cmd1_Click()
Dim OldPath As String
Dim NewPath As String
a = 13048
b = " VQRUN" & " " & a & ".prn" & " " & a & ".out"
'vqrun is the name of the program that i wanted to run in command prompt
'and 13048.prn and 13048.out are the parameters passed to the application
vqrun.
OldPath = CurDir
NewPath = "C:\VQ80_2\ "
ChDrive NewPath
ChDir NewPath
', now, it opens the cmd prompt with the new path, which is fine(c:\vq80_2),
but now i need to run 'vqrun along wit the parameters'.
i know that the below line is wrong because i cannot simply add 'b', but is
there anyway i could do this?
ret = Shell("c:\winnt\system32\cmd.exe", b)
anyhelp on this is much much appreciated because i have been waiting for the
answer of this question for a long time. cheers.