Excel vba winscpnet.dll does not have open command in session object
I'm trying to access files from an FTP site using Excel VBA. I have used WinSCP to get the parameters for sftp protocol used in the code below. I have successfully registered the dll file listed below. The code below works until I get to the open command. There is no open command within the session object. That is my problem.
I can launch Winscp.exe successfully from Excel VBA. I got the open parameters (protocol, name, etc) from WinSCP. The code below executed successfully until we get to the mysession.open.
I don't know how to insert a screen shot here, but the object browser shows these items under winscpnet:
OS is: Windows 10 Home, version 1909
Winscp is 5.17.7
winscpnet.dll is 1.17.2.10640
I can launch Winscp.exe successfully from Excel VBA. I got the open parameters (protocol, name, etc) from WinSCP. The code below executed successfully until we get to the mysession.open.
Dim tmp1 As Variant tmp1 = VBA.Shell("c:\Program Files (x86)\winscp\winscp.exe", vbNormalFocus) Stop With MysessionOptions .Protocol = WinSCPnet.Protocol_Sftp .HostName = "sftp.datashop.livevol.com" .UserName = "dbrower9_ix_netcom_com" .Password = "Davyb002##" .SshHostKeyFingerprint = "ssh-rsa 2048 4yK/0LgwT2ERct0jZXdP6590zT9Qdhv78xfjWdv91lQ=" .SshPrivateKeyPath = "C:\MyKeys\MyPrivateKey.ppk" End With ' Connect mySession.Open (MysessionOptions) ' Your code Stop End Sub
Failed
, FileTransferProgress
, FileTransfered
, OutputDataReceived
, QueryReceived
. There is no Open
.
OS is: Windows 10 Home, version 1909
Winscp is 5.17.7
winscpnet.dll is 1.17.2.10640