

Dim ftpRequest As FtpWebRequest = CType(WebRequest.Create(ftpuri), FtpWebRequest) Try ftpRequest.Method = ' Confirm the Network credentials based on the user name and password passed in. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 Private Sub FtpUploadFile( ByVal filetoupload As String, ByVal ftpuri As String, ByVal ftpusername As String, ByVal ftppassword As String) ' Create a web request that will be used to talk with the server and set the request method to upload a file by ftp. Anyway, here’s the method that takes those four parameters.

I’m not sure that’s very realistic in a scenario where you are uploading your personal files.

VBA Code: Public Sub TestDownload() FtpDownloadFile '/ProductExportmpc0001.zip', 'C:\Temp\ProductExportmpc0001. The cmd /k keeps the command window open so that you can see any errors, but you must close it manually to continue VBA code execution. Uploading Here’s a method that takes the four key pieces of information: The name of the file to be uploaded The web address of the ftp server on your web host Your FTP username on your web host The FTP Password I’ve been surprised at how many examples only cover cases where Anonymous FTP is allowed. Try this equivalent ftp command line method. In these days of Azure and The Cloud this post might seem to be a bit out of date, but if you want to access files on your web hosting service then here’s how you can do it with FTP.
