Create new WinSCPnet.Session Object in VBA fails

Advertisement

hans.wirz@xmv.ch
Joined:
Posts:
2

Create new WinSCPnet.Session Object in VBA fails

Hi I'd like to use your .Net wrapper to do some FTP-Stuff within MS Access 2010 with VBA.
As I try to create a new Session-Objekt, I allways get an Automation-Error ([-2146233321] Automatisierungsfehler).

I did download the latest Assembly and registered as written in your Website.
In Access the TLB is visible after registration and 'compiling' the VBA-Code went without errors

The Code which fails looks like this:
Sub SessionOpen()
    If Not mySession Is Nothing Then
        mySession.Dispose
    End If
    Set mySession = New WinSCPnet.Session
    
    On Error GoTo er
    
    mySession.Open GetSessionOptions
    
    GoTo finish
er:
    handleError True
    
finish:
        
End Sub


Is there something else I've probably missed to get the Wrapper running?
I use Windows 10 on a 64bit Dell-Maschine.

I appreciate your help
Kind regards
Hans

Reply with quote

Advertisement

Guest

Re: Create new WinSCPnet.Session Object in VBA fails

martin wrote:

Are you getting the error on Set mySession = New WinSCPnet.Session ?
Sorry for not beeng back earlier ;-)
Yes, the error appears exactly on that line

Reply with quote

Advertisement

You can post new topics in this forum