Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Launching a DOS box from VBA

Windows 98, Excel 2002. Haven't a clue if this is possible!

As it stands now, a legacy DOS program runs its course in a window,
then the window closes when it's done.

I am in the process of eliminating this program. There is quite a bit
of data, and I can only retrieve one item at a time without having to
restart the DOS program.

1) Can I start a DOS Window from VBA...
2) ...and if so, can I check to see the state of the DOS window (ie,
is it active, does it have the focus, is still open, even is it
minimized, and even ensure there's only one instance running)?

No need to answer this next part, but if I am asking a simple question
in the first place....

What I am dreaming about is cranking up a macro, launching the DOS
window with the right parameter, pipe the output of the batch file
into the spreadsheet, check to see if the windows open, and if so,
kill it, then loop all over again. Once I gather the data, I put it
into a real application, (i.e., DATABASE).

God help me.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Launching a DOS box from VBA

The shell command can be used to start your executable (and will open a
window)

http://support.microsoft.com/?id=214248
XL2000: How to Force Macro Code to Wait for Outside Procedure

http://support.microsoft.com/?id=129796
HOWTO: 32-Bit App Can Determine When a Shelled Process Ends

http://support.microsoft.com/?id=147392
XL: How to Force Macro Code to Wait for Outside Procedure

http://support.microsoft.com/default...b;en-us;147659
HOWTO: Get a Window Handle Without Specifying an Exact Title


--
Regards,
Tom Ogilvy


David Dalebroux wrote in message
om...
Windows 98, Excel 2002. Haven't a clue if this is possible!

As it stands now, a legacy DOS program runs its course in a window,
then the window closes when it's done.

I am in the process of eliminating this program. There is quite a bit
of data, and I can only retrieve one item at a time without having to
restart the DOS program.

1) Can I start a DOS Window from VBA...
2) ...and if so, can I check to see the state of the DOS window (ie,
is it active, does it have the focus, is still open, even is it
minimized, and even ensure there's only one instance running)?

No need to answer this next part, but if I am asking a simple question
in the first place....

What I am dreaming about is cranking up a macro, launching the DOS
window with the right parameter, pipe the output of the batch file
into the spreadsheet, check to see if the windows open, and if so,
kill it, then loop all over again. Once I gather the data, I put it
into a real application, (i.e., DATABASE).

God help me.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Launching a DOS box from VBA

This article is perfect -- http://support.microsoft.com/?id=147392
(XL: How to Force Macro Code to Wait for Outside Procedure)

I guess I just didn't know what to query on! Thank you for your
assistance!
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
Launching from a cell Jennifer[_5_] New Users to Excel 5 July 11th 11 09:55 PM
Launching Excel RichD Setting up and Configuration of Excel 2 December 20th 07 02:29 AM
Launching Excel TelAb Excel Discussion (Misc queries) 2 June 9th 07 07:35 PM
Launching Excel wllee Excel Discussion (Misc queries) 4 August 31st 05 01:05 AM
launching xls in web browser anon Excel Discussion (Misc queries) 0 April 12th 05 07:02 PM


All times are GMT +1. The time now is 03:41 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"