Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
has anybody come across this before?
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
has anybody come across this before?
Jason,
See my reply in Worksheetfunctions, and please don't cross post - it wastes time and effort. Bernie MS Excel MVP "Jason" wrote in message ... 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|