Hello,
I have been trying to connect to some outside servers using VBA with Rumba FTP Client 4.4 but have been unable to successfully do so. I can create the connections using the GUI, but receive an error 500 when I try to do this with the same setting using VBA.
Also, when I try to create a saved session, I receive the following error:
err.Description: "Automation error Unspecified error"
err.Number: -2147467259
Here is my code for trying to both connect and/or save:
Dim oFtpApp As FTPSFTPLib.SFtpApplication
Dim oFtpSession As FTPSFTPLib.SFtpSession
Dim nRC As Integer
Set oFtpApp = New FTPSFTPLib.SFtpApplication
Set oFtpSession = oFtpApp.newSession
oFtpSession.Hostname = "my host name"
oFtpSession.UserName = "my user name"
oFtpSession.Password = "my password"
oFtpSession.ServerType = "UNIX"
oFtpSession.TransferType = "Auto Detect"
oFtpSession.Protocol = "SFTP"
oFtpSession.Port = "22"
nRC = oFtpSession.SaveSessionFileAs("testSessionConnection.sft") ' NOTE: This will cause the Automation error Unspecified error
' Connect to the host session.
' --------------------------------------------------------------------------------------
nRC = oFtpSession.Connect
If (nRC <> 0) Then
MsgBox nRC, vbExclamation vbSystemModal, "Unsuccessful"
Else
MsgBox "Connection Successful", vbExclamation vbSystemModal, "Successful"
End If
oFtpApp.CloseAllSessions
oFtpApp.Quit
Again, this specific setting works when I create the session using the GUI, but not through VBA. Can anyone show me what I'm missing?
#ftp
#Vba
#Rumba