Re: How do I launch MS-DOS prompt to execute a batch file from within Excel work*** with /VBA?
From: Earl Kiosterud (nowhere_at_nowhere.com)
Date: 05/19/04
- Next message: JohnT: "Re: Print Fomulae ONLY??"
- Previous message: Peo Sjoblom: "Re: Using VLOOKUP in an array"
- In reply to: veritasca: "How do I launch MS-DOS prompt to execute a batch file from within Excel work*** with /VBA?"
- Next in thread: veritasca: "Re: How do I launch MS-DOS prompt to execute a batch file from within Excel work*** with /VBA?"
- Reply: veritasca: "Re: How do I launch MS-DOS prompt to execute a batch file from within Excel work*** with /VBA?"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 18 May 2004 20:35:41 -0400
Veritasca,
You've asked for a command prompt from VBA. You probably don't need to do
that in order to run your batch file. The command prompt is a user
interface where you tell windows to run a program. You type its name at the
prompt. If you really want it, use Shell, as Dave said, launching cmd.
That's the name of the command prompt program:
Shell "cmd", vbMaximizedFocus
In some older Windows versions, it was "command" (as it was in DOS).
But you can run your batch program from VBA automatically, without a command
prompt. Just use the name of your batch file:
Shell "a.bat" ' or
Shell "a.bat", vbMaximizedFocus
-- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- "veritasca" <tuyet.ctn@barra.com> wrote in message news:40aa8977$0$201$75868355@news.frii.net... > I am creating a batch file with MS-DOS commands within an Excel > work*** using VBA. Now, I have to execute this batch file. I don't > know how to launch the MS-DOS prompt and then write out the command to > execute the batch file. Any ideas would be appreciated. Thanks. > > ** Posted via: http://www.ozgrid.com > Excel Templates, Training, Add-ins & Business Software Galore! > Free Excel Forum http://www.ozgrid.com/forum ***
- Next message: JohnT: "Re: Print Fomulae ONLY??"
- Previous message: Peo Sjoblom: "Re: Using VLOOKUP in an array"
- In reply to: veritasca: "How do I launch MS-DOS prompt to execute a batch file from within Excel work*** with /VBA?"
- Next in thread: veritasca: "Re: How do I launch MS-DOS prompt to execute a batch file from within Excel work*** with /VBA?"
- Reply: veritasca: "Re: How do I launch MS-DOS prompt to execute a batch file from within Excel work*** with /VBA?"
- Messages sorted by: [ date ] [ thread ]