ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to execute a program and return it's output to me in VBA. (https://www.excelbanter.com/excel-programming/396607-how-execute-program-return-its-output-me-vba.html)

Mac Lingo[_2_]

How to execute a program and return it's output to me in VBA.
 
I need to execute an FTP program and return directory information from the
ftp'd computer so I can manipulate it in VBA. I know how to write a batch
file to start the program and the file the batch file starts.

What I don't know is how to start the process in VB so I get the output of
running the program back to my VBA program.

Thanks,
Mac in Berkeley



papou[_2_]

How to execute a program and return it's output to me in VBA.
 
Hello Mac
See help on Shell in VBA help.

HTH
Cordially
Pascal

"Mac Lingo" a écrit dans le message de news:
...
I need to execute an FTP program and return directory information from the
ftp'd computer so I can manipulate it in VBA. I know how to write a batch
file to start the program and the file the batch file starts.

What I don't know is how to start the process in VB so I get the output of
running the program back to my VBA program.

Thanks,
Mac in Berkeley




Tom Ogilvy

How to execute a program and return it's output to me in VBA.
 
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

--
Regards,
Tom Ogilvy


"Mac Lingo" wrote:

I need to execute an FTP program and return directory information from the
ftp'd computer so I can manipulate it in VBA. I know how to write a batch
file to start the program and the file the batch file starts.

What I don't know is how to start the process in VB so I get the output of
running the program back to my VBA program.

Thanks,
Mac in Berkeley




[email protected][_2_]

How to execute a program and return it's output to me in VBA.
 
Ha ha.

There is a way to capture the output. But because you didn't try the
ftp script solution I posted for your same question yesterday, I'm not
going to give it to you.

All right. I'll give you a tip ...

ftp -s example.scr ftp_output.txt




Mac Lingo[_2_]

I didn't get it before.
 
Piping is such a simple answer. And thank you very much.

Tho I don't get the reason for the "scr" type. I've figured out how to do
it with an ordinary batch file, but I couldn't even figure out what the
"scr" type was for. I guess scripting, but I don't know anything about
programming in that enviornment.

Mac




All times are GMT +1. The time now is 07:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com