Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default Tough One - Return output from Dos Process without writing to file

Hi All,

Does anyone know of an approach that could be used to return the output of a
dos command without having to create a temporary file.

I am currently using the following dos command as part of a "Shell"
command:-

ping localhost temp.txt

I can only find solutions that seem to only work in .net and I need
something for good old VBA

Thanks in advance

Andi


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Tough One - Return output from Dos Process without writing to file

http://vbnet.mvps.org/code/internet/ping.htm

--
Regards,
Tom Ogilvy

"Andibevan" wrote in message
...
Hi All,

Does anyone know of an approach that could be used to return the output of

a
dos command without having to create a temporary file.

I am currently using the following dos command as part of a "Shell"
command:-

ping localhost temp.txt

I can only find solutions that seem to only work in .net and I need
something for good old VBA

Thanks in advance

Andi




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default Tough One - Return output from Dos Process without writing to file

Tom - thanks for the suggestion but I don't actually want to be able to ping
I actually need to return output from a 3rd party app but thought my example
would be more helpful.

As another example how would I return the information produced by the
command DIR?

"Tom Ogilvy" wrote in message
...
http://vbnet.mvps.org/code/internet/ping.htm

--
Regards,
Tom Ogilvy

"Andibevan" wrote in message
...
Hi All,

Does anyone know of an approach that could be used to return the output

of
a
dos command without having to create a temporary file.

I am currently using the following dos command as part of a "Shell"
command:-

ping localhost temp.txt

I can only find solutions that seem to only work in .net and I need
something for good old VBA

Thanks in advance

Andi






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Tough One - Return output from Dos Process without writing to file

If your shelling to the app then I doubt there is a way to get anything back
except perhaps a result code which would most likely be zero.

--
Regards,
Tom Ogilvy


"Andibevan" wrote in message
...
Tom - thanks for the suggestion but I don't actually want to be able to

ping
I actually need to return output from a 3rd party app but thought my

example
would be more helpful.

As another example how would I return the information produced by the
command DIR?

"Tom Ogilvy" wrote in message
...
http://vbnet.mvps.org/code/internet/ping.htm

--
Regards,
Tom Ogilvy

"Andibevan" wrote in message
...
Hi All,

Does anyone know of an approach that could be used to return the

output
of
a
dos command without having to create a temporary file.

I am currently using the following dos command as part of a "Shell"
command:-

ping localhost temp.txt

I can only find solutions that seem to only work in .net and I need
something for good old VBA

Thanks in advance

Andi








  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Tough One - Return output from Dos Process without writing to

Have a look at this - I think it will help you....

http://msdn.microsoft.com/library/de...ctPropMeth.asp


--
www.alignment-systems.com


"Tom Ogilvy" wrote:

If your shelling to the app then I doubt there is a way to get anything back
except perhaps a result code which would most likely be zero.

--
Regards,
Tom Ogilvy


"Andibevan" wrote in message
...
Tom - thanks for the suggestion but I don't actually want to be able to

ping
I actually need to return output from a 3rd party app but thought my

example
would be more helpful.

As another example how would I return the information produced by the
command DIR?

"Tom Ogilvy" wrote in message
...
http://vbnet.mvps.org/code/internet/ping.htm

--
Regards,
Tom Ogilvy

"Andibevan" wrote in message
...
Hi All,

Does anyone know of an approach that could be used to return the

output
of
a
dos command without having to create a temporary file.

I am currently using the following dos command as part of a "Shell"
command:-

ping localhost temp.txt

I can only find solutions that seem to only work in .net and I need
something for good old VBA

Thanks in advance

Andi











  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Tough One - Return output from Dos Process without writing to

Thanks John - That seems to be only for windows script - do you know of any
code that will work in VBA? Or can you use VB script within an excel file?

"John.Greenan" wrote in message
...
Have a look at this - I think it will help you....

http://msdn.microsoft.com/library/de...ctPropMeth.asp


--
www.alignment-systems.com


"Tom Ogilvy" wrote:

If your shelling to the app then I doubt there is a way to get anything
back
except perhaps a result code which would most likely be zero.

--
Regards,
Tom Ogilvy


"Andibevan" wrote in message
...
Tom - thanks for the suggestion but I don't actually want to be able to

ping
I actually need to return output from a 3rd party app but thought my

example
would be more helpful.

As another example how would I return the information produced by the
command DIR?

"Tom Ogilvy" wrote in message
...
http://vbnet.mvps.org/code/internet/ping.htm

--
Regards,
Tom Ogilvy

"Andibevan" wrote in message
...
Hi All,

Does anyone know of an approach that could be used to return the

output
of
a
dos command without having to create a temporary file.

I am currently using the following dos command as part of a "Shell"
command:-

ping localhost temp.txt

I can only find solutions that seem to only work in .net and I need
something for good old VBA

Thanks in advance

Andi











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
Time Format to Text Output - A Tough One ! John Calder New Users to Excel 4 September 24th 09 12:22 AM
Writing a macro to compare columns and return a value Ginny Excel Discussion (Misc queries) 1 June 30th 09 08:28 PM
convert whole excel file to vba (tough question?) Florianbur[_3_] Excel Programming 3 June 21st 04 10:53 AM
Custom function to return output in multiple cells Asif[_3_] Excel Programming 1 December 2nd 03 06:22 PM
Writing an Excel Spreadsheet via a program's output Blake[_2_] Excel Programming 3 August 27th 03 11:20 AM


All times are GMT +1. The time now is 11:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"