Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default passing parameters to dos from vba..

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????

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default passing parameters to dos from vba..

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????



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default passing parameters to dos from vba..

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????




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default passing parameters to dos from vba..

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????






  #5   Report Post  
Posted to microsoft.public.excel.programming
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????







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing parameters Cel Ref) to Sum function Shamshad Butt Excel Discussion (Misc queries) 4 October 26th 05 10:46 AM
Passing parameters WarrenR Excel Programming 4 February 28th 04 09:11 PM
Passing parameters between functions Gaston[_7_] Excel Programming 4 February 9th 04 04:08 AM
Passing parameters Eleanor[_2_] Excel Programming 0 February 4th 04 05:21 PM
Passing parameters to UDF mbobro[_3_] Excel Programming 5 January 2nd 04 04:25 PM


All times are GMT +1. The time now is 02:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"