Create new WinSCPnet.Session Object in VBA fails

Advertisement

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

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

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

Re: Create new WinSCPnet.Session Object in VBA fails

Are you getting the error on Set mySession = New WinSCPnet.Session ?

Reply with quote

Advertisement

You can post new topics in this forum