PDA

View Full Version : Excel VBA upload via SFTP



Ronaldkok
03-30-2020, 05:07 AM
Dear members,

In the past I used this code below to automatically upload files to my FTP. Now I moved to SFTP and it doesnt work anymore.

Does someone know how to upload to #SFTP via VBA?

Thanks and have a nice day,

Ronald

'---------------------------------------------------------------------------------
'set variable parameters
TempFolderName = "zqqftptemp"
DiscName = "C" 'put the name of disc for temporary files, for example "D".
ftpSite = "xxxxxxx 'put the website name, for example "mywebsite.com"
ftpPath = "/articles" 'put the path to ftp folder, for example "/public_html/uploaded_files/"
ftpLogin = "xxxxx" 'put your ftp login, for example "john123"
ftpPassword = "xxxxxxx" 'put your ftp password, for example "pass123"
'---------------------------------------------------------------------------------

snb
03-30-2020, 06:07 AM
This code doesn't do anything, it's useless.

Ronaldkok
03-30-2020, 06:15 AM
Hi, yes its just as an example here.
Got an idea how to upload it to SFTP?

snb
03-30-2020, 06:54 AM
Another example


Sub M_snb()
uploadFTp "example"
End Sub