[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

excel VBA FTP

Posted on 2011-09-07
3
Medium Priority
?
359 Views
Last Modified: 2012-05-12
Hello all,  trying to see if this is possible and can be encoded.  After the last line in my vba code to transfer the in C:\Users\data\mysummary.pdf, C:\Users\data\mysummary.html, and C:\Users\data\filelist.html to my webserver via FTP.  I have my username and password to my FTP, just looking on a way to do this.  Thanks.
0
Comment
Question by:sandramac
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 15

Expert Comment

by:Minh Võ Công
ID: 36500521
Do you want download or upload file?
0
 

Author Comment

by:sandramac
ID: 36500730
Looking to upload
0
 
LVL 16

Accepted Solution

by:
AlexPace earned 2000 total points
ID: 36504204
You could write a Robo-FTP script to upload files with these names to the remote site.  You can use the -s command line switch when you launch Robo-FTP so it automatically runs your script.  If you don't know the exact name of the files before your process runs, you could pass them on the command line also using the -p1 -p2 and -p3 arguments as described in this excerpt from the help file:
-pX arg    Define Shortcut Target argument
Use of the -pX switch is the preferred method to pass external arguments into Robo-FTP from a shortcut or the Windows Command Prompt command line. The value X must be the single digit 1 - 9. Therefore, up to nine arguments may be passed this way and are assigned to internally defined script file variables %1 through %9. The single space between X and arg is required.

The advantage to this method over the legacy method (see below) is that Windows environment variables (e.g.,  %SystemDrive%, %USERNAME%, etc.) as well as user defined strings may be passed into Robo-FTP. Consider this example where the name of a file to process is passed on the command line:
    C:\program files\robo-ftp 3.7\robo-ftp.exe -p1 FridaySales.xls

The values could then be used by Robo-FTP as follows:
    SENDFILE %1

... or you could invoke Robo-FTP using COM instead of running it as an external executable.  This allows control to remain inside of your VBA function and you could just feed Robo-FTP commands one at a time.  Here is an example showing how to do that as a VBScript so it should be fairly easy to convert to VBA:  http://www.robo-ftp.com/help/3.7/sample_vbscript.htm
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question