Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro commands to assign colors to each line in an Excel chart. | Charts and Charting in Excel | |||
save prompt for user exit, but no save prompt for batch import? | Excel Discussion (Misc queries) | |||
xp shell command using vba | Excel Programming | |||
Shell | Excel Programming | |||
Shell function II | Excel Programming |