Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Commands at the line prompt using Shell

Hello

Presently I invoke a batch file to initate the desired commands in the DOS
Shell:

RetVal = Shell("c:\SaleItems\SaveDataOut.bat", 1)

but the macro has matured such that I would prefer to run line commands at
the prompt using VBA (which would allow me to put in variables) instead of
running the static batch file.

Is there a way to do that?

Please help.

W


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Commands at the line prompt using Shell

W,

RetVal = Shell("c:\SaleItems\SaveDataOut.bat Var1 Var2", 1)
--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"cogent" wrote in message
...
Hello

Presently I invoke a batch file to initate the desired commands in the DOS
Shell:

RetVal = Shell("c:\SaleItems\SaveDataOut.bat", 1)

but the macro has matured such that I would prefer to run line commands at
the prompt using VBA (which would allow me to put in variables) instead of
running the static batch file.

Is there a way to do that?

Please help.

W




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Commands at the line prompt using Shell

W,

Oops. They're variables. Heh heh. <sg Make that:

RetVal = Shell("c:\SaleItems\SaveDataOut.bat " & Var1 & " " & Var2, 1)

--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"Earl Kiosterud" wrote in message
...
W,

RetVal = Shell("c:\SaleItems\SaveDataOut.bat Var1 Var2", 1)
--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"cogent" wrote in message
...
Hello

Presently I invoke a batch file to initate the desired commands in the

DOS
Shell:

RetVal = Shell("c:\SaleItems\SaveDataOut.bat", 1)

but the macro has matured such that I would prefer to run line commands

at
the prompt using VBA (which would allow me to put in variables) instead

of
running the static batch file.

Is there a way to do that?

Please help.

W






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
Macro commands to assign colors to each line in an Excel chart. JohnnyC Charts and Charting in Excel 3 July 6th 09 11:46 AM
save prompt for user exit, but no save prompt for batch import? lpj Excel Discussion (Misc queries) 1 February 25th 06 02:08 AM
xp shell command using vba Sudhendra Excel Programming 2 February 16th 04 05:56 AM
Shell Joseph[_12_] Excel Programming 1 February 1st 04 04:33 AM
Shell function II [email protected] Excel Programming 1 September 19th 03 05:55 PM


All times are GMT +1. The time now is 05:14 PM.

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"