Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can use the windows script within vba. Just reference the windows script
host object model wshom.ocx - should be in the system32 directory. -- www.alignment-systems.com "Andibevan" wrote: 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Time Format to Text Output - A Tough One ! | New Users to Excel | |||
Writing a macro to compare columns and return a value | Excel Discussion (Misc queries) | |||
convert whole excel file to vba (tough question?) | Excel Programming | |||
Custom function to return output in multiple cells | Excel Programming | |||
Writing an Excel Spreadsheet via a program's output | Excel Programming |