File transfer by VBA fails
Hello,
I use WinSCP 4.5 and have registered the WinSCPnet.dll.
With the code below I receive an error
I tried anything but cannot find the mistake. Could Maybe anoyone can give me a hint?
Thanks in advance
Oliver
Code:
I use WinSCP 4.5 and have registered the WinSCPnet.dll.
With the code below I receive an error
In the logfile I can see, that FTPS is used as protocol, but withSession.protocol is Protocol.Sftp od Protol.Scp, but SessionOptions.SshHostKeyFingerprint not set.
FTPSecure = implicit
(although I have .FtpSecure = 1
in my code):
. 2025-04-29 13:15:30.111 FTPS: Implicit TLS/SSL [Client certificate: No]
Thanks in advance
Oliver
Code:
Dim session As Object Dim sessionOptions As Object ' Create the WinSCP Session Options Set session = CreateObject("WinSCP.Session") Set sessionOptions = CreateObject("WinSCP.SessionOptions") session.SessionLogPath = "C:\Temp\winscp_ftps.log" With sessionOptions .protocol = 1 'FTPS .HostName = ftpserver .PortNumber = 21 .UserName = UserName .Password = Password .FtpMode = 1 .FtpSecure = 1 ' Explicit TLS/SSL .GiveUpSecurityAndAcceptAnyTlsHostCertificate = True End With session.Open sessionOptions