View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
rita rita is offline
external usenet poster
 
Posts: 64
Default passing parameters to dos from vba..

Thankx!! We'll give your idea a try.



"Bernie Deitrick" wrote:

Rita,

You could pipe the output to a file, if your DOS program allows it, then open that file from Excel.
But I don't know of any way to capture the values in a DOS window and import them directly into
Excel.

HTH,
Bernie
MS Excel MVP


"Rita" wrote in message
...
On top of opening the command prompt window...
Is it possible to run commands and copy the whole output...

for example,
think there's some script written by others (which i only know how to use)...
command to key = c:\display thisProduct

it will then display a table of information in Dos Mode
subsequently, i'll need to copy the whole table into excel spreadsheet...

This sounds kinda complicated... but that's the best way i can elaborate...
please advice.
Thanks in advance,
Rita


"Bernie Deitrick" wrote:

You don't need to change the directory - you could just use it as part of the shell command
string:

Shell "C:\Path\FileName.exe"

Or with parameters:
Shell "C:\Path\FileName.exe /s"

HTH,
Bernie
MS Excel MVP


wrote in message
oups.com...
hi, i am trying to open msdos from vba using shell command, and then to
pass a parameter or a command so that i could change the current
directory and then to run a program..

or is there a way that i could just paste a text in command prompt so
that wtever entered runs when the return key is pressed????