Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.word.vba.general
external usenet poster
 
Posts: 10
Default Getting output of a called external executale

Hi all,

I want to call an external executable (.exe in my case) from an Excel-VBA
program.
I found the Shell function, but with this function it is only possible to
get an integer return value back.

Is there is any possibility to use pipes to get the output of the external
program to VBA?

Thanks Thorsten


  #2   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.word.vba.general
external usenet poster
 
Posts: 400
Default Getting output of a called external executale

Try:

Shell "Your.EXE C:\MYFILE.TXT"

Then Open C:\MYFILE.TXT for Inpuit as #1
and read the contents of the file sequentially:

Line Input #1,A$

Use A$ in your VBA Code as required.


"Thorsten Walenzyk" wrote:

Hi all,

I want to call an external executable (.exe in my case) from an Excel-VBA
program.
I found the Shell function, but with this function it is only possible to
get an integer return value back.

Is there is any possibility to use pipes to get the output of the external
program to VBA?

Thanks Thorsten



  #3   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.word.vba.general
external usenet poster
 
Posts: 1,758
Default Getting output of a called external executale

Maybe you could send the output from your .exe program into a text file and then
read that text file in code.

Thorsten Walenzyk wrote:

Hi all,

I want to call an external executable (.exe in my case) from an Excel-VBA
program.
I found the Shell function, but with this function it is only possible to
get an integer return value back.

Is there is any possibility to use pipes to get the output of the external
program to VBA?

Thanks Thorsten


--

Dave Peterson
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
what is this called? : < Jake Excel Worksheet Functions 1 November 28th 06 11:01 AM
How can a UDF be called from a formula? GuyH Excel Worksheet Functions 0 November 17th 04 03:37 PM
Run Workbook_Open only if called Jarek[_14_] Excel Programming 0 September 18th 04 10:05 AM
Excel called from external app (OLE) stops after processing exactly 10921 rows Peter Gloor Excel Programming 6 March 5th 04 03:38 PM
Getting output from an excel output back to cscript.. J S Excel Programming 0 January 21st 04 09:06 PM


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