Skip to main content

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

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

Hi,
can you try to use late binding when working with the FTP components ?
I'm attaching a working late binding example:

ftp.txt

cheers


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

Thank you for the replay. I just tried late binding with the same results. Trying to save the session file gave an "Automated Error" message. Trying to connect gives me a nRC = 500.

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
Hi,
I tested Rumba FTP 4.4 under Win10 with my posted code and it works without problem.
I'm using Excel VBA to run the code.
Can you please add oFtpSession.TraceLevel = 5 to your code ?
This line will add some logging to the ftp connection. Trace level 5 will add FTPEngine.log ,FTPSFTP.log and some RSSxxx.log files into your %temp% Directory.