Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 866
Default Run an External .exe

Is it possible from Excel (using the buttons) to:
1) run an external .exe
2) When the .exe finishes pick up the outputs of the .exe in excel
Thanks again,
Dan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Run an External .exe

You can run external programs using the shell command, but as for picking up
the outputs, are they being stored somewhere or just how do you propose
getting them.
--
HTH...

Jim Thomlinson


"Dan" wrote:

Is it possible from Excel (using the buttons) to:
1) run an external .exe
2) When the .exe finishes pick up the outputs of the .exe in excel
Thanks again,
Dan

  #3   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 866
Default Run an External .exe

Jim,
Thanks,

Could you please provide an example of this "shell" command.

Wrt picking up, the .exe ouputs a text file.
Do I have a way to know when the .exe finished, ie: when this text file is
ready for pick up? I would like to do all this automatically from Excel, in
this way, I could run pre existing .exe routines, which are transparent to
me in excel and then pick up results and post process in excel.

Thx again
Dan

"Jim Thomlinson" wrote:

You can run external programs using the shell command, but as for picking up
the outputs, are they being stored somewhere or just how do you propose
getting them.
--
HTH...

Jim Thomlinson


"Dan" wrote:

Is it possible from Excel (using the buttons) to:
1) run an external .exe
2) When the .exe finishes pick up the outputs of the .exe in excel
Thanks again,
Dan

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Run an External .exe

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

--
Regards,
Tom Ogilvy


"Dan" wrote in message
...
Jim,
Thanks,

Could you please provide an example of this "shell" command.

Wrt picking up, the .exe ouputs a text file.
Do I have a way to know when the .exe finished, ie: when this text file is
ready for pick up? I would like to do all this automatically from Excel,

in
this way, I could run pre existing .exe routines, which are transparent

to
me in excel and then pick up results and post process in excel.

Thx again
Dan

"Jim Thomlinson" wrote:

You can run external programs using the shell command, but as for

picking up
the outputs, are they being stored somewhere or just how do you propose
getting them.
--
HTH...

Jim Thomlinson


"Dan" wrote:

Is it possible from Excel (using the buttons) to:
1) run an external .exe
2) When the .exe finishes pick up the outputs of the .exe in excel
Thanks again,
Dan



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Run an External .exe

Here is how you use the shell command...

Sub RunProgram()
Shell ("C:\Windows\Notepad.exe")
End Sub

You can use a file system object to read the text file and depending you can
try using

DoEvents 'to make sure the process has completed
or
Use OnTime to specify a wait time
--
HTH...

Jim Thomlinson


"Dan" wrote:

Jim,
Thanks,

Could you please provide an example of this "shell" command.

Wrt picking up, the .exe ouputs a text file.
Do I have a way to know when the .exe finished, ie: when this text file is
ready for pick up? I would like to do all this automatically from Excel, in
this way, I could run pre existing .exe routines, which are transparent to
me in excel and then pick up results and post process in excel.

Thx again
Dan

"Jim Thomlinson" wrote:

You can run external programs using the shell command, but as for picking up
the outputs, are they being stored somewhere or just how do you propose
getting them.
--
HTH...

Jim Thomlinson


"Dan" wrote:

Is it possible from Excel (using the buttons) to:
1) run an external .exe
2) When the .exe finishes pick up the outputs of the .exe in excel
Thanks again,
Dan



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Run an External .exe

Very Nice... I never have to wait for outside apps but if I ever do this will
be handy. Thanks Tom... I was very suspicious of whether DoEvents would work.
I had my doubts...
--
HTH...

Jim Thomlinson


"Tom Ogilvy" wrote:

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

--
Regards,
Tom Ogilvy


"Dan" wrote in message
...
Jim,
Thanks,

Could you please provide an example of this "shell" command.

Wrt picking up, the .exe ouputs a text file.
Do I have a way to know when the .exe finished, ie: when this text file is
ready for pick up? I would like to do all this automatically from Excel,

in
this way, I could run pre existing .exe routines, which are transparent

to
me in excel and then pick up results and post process in excel.

Thx again
Dan

"Jim Thomlinson" wrote:

You can run external programs using the shell command, but as for

picking up
the outputs, are they being stored somewhere or just how do you propose
getting them.
--
HTH...

Jim Thomlinson


"Dan" wrote:

Is it possible from Excel (using the buttons) to:
1) run an external .exe
2) When the .exe finishes pick up the outputs of the .exe in excel
Thanks again,
Dan




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
External Data Warning Message - I have No External Data in wrkbk Cass_makeitfun[_2_] Excel Discussion (Misc queries) 0 May 12th 10 09:02 PM
Getting External Data based on criteria insde of the external data BigMacExcel Excel Discussion (Misc queries) 0 August 31st 09 06:41 PM
How do I fix problems with the external USB 10-key pad? accounting daizies[_2_] Setting up and Configuration of Excel 1 July 21st 09 04:20 PM
external data Steve Excel Discussion (Misc queries) 1 July 13th 06 12:45 PM
External dll Chiwa Excel Programming 1 February 11th 04 10:03 PM


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