Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
ftp --- VBA
Hello everyone,
Is it possible to ftp to a location and prompt the user for the remote file and where to save the file locally? (text transfer). Thanks in advance. -- Himansu |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
ftp --- VBA
First step:
create and test a script to ftp a file: open mydomain.com user myusername mypassword binary cd /tmp put C:/myfilethatiwant2ftp.txt quit EOF Replace variables having names my* with your counterparts. Save file. Give it a .scr suffix. Example C:/mydoftp.scr Execute the following command to test mydoftp.scr c:\windows\system32\ftp.exe -n -s:mydoftp.scr Step 2: Use Excel VBA to create mydoftp.scr Sub WriteStr(str As String, basename As String) Dim DoWrite As Boolean Dim DoBreak As String DoWrite = True If DoWrite Then Open "C:\mydoftp.scr" For Output As #1 Print #1, str Close #1 End If DoBreak = "" End Sub The variable str should be a string consisting of the revised test script. Google this newsgroup about how to execute a shell command from Excel. Make it so that Excel calls c:\windows\system32\ftp.exe -n -s:mydoftp.scr Hello everyone, Is it possible to ftp to a location and prompt the user for the remote file and where to save the file locally? (text transfer). Thanks in advance. -- Himansu |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|