Accessing COM library via VBA

Advertisement

michaelikane
Joined:
Posts:
1
Location:
New York, NY

Accessing COM library via VBA

I am trying to use the library in Office VBA. I have successfully registered it and added the COM as a reference in the VBA editor. However, despite using the VB script examples on this site as a guide, I cannot GetObject WinSCP, much less pass session options to it or use it with other macros I have written.

Does anyone have any samples for opening a session, connecting and putting a file on a server for VBA?

Reply with quote

Advertisement

etienne
Joined:
Posts:
1

Hi,

I am also trying to use WinSCP with VBA but I cannot find the ".NET wrapper for WinSCP console interface" in Tools > References.

Actually I have a portable version of WinSCP, and I could not register the WinSCP.dll assembly.

When trying to register the assembly:
C:\Windows\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe WinSCP.dll /codebase /tlb

I have the following error message:
RegAsm : error RA0000 : Unable to locate input assembly 'WinSCP.dll' or one of its dependencies.

As recommended, the WinSCP.dll file is in the same folder as the portable WinSCP executable

Any idea?

Thank you in advance for your help

Reply with quote

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

etienne wrote:

When trying to register the assembly:
C:\Windows\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe WinSCP.dll /codebase /tlb

I have the following error message:
RegAsm : error RA0000 : Unable to locate input assembly 'WinSCP.dll' or one of its dependencies.
There did you get the winscp.dll from?

Did you follow this guide?
https://winscp.net/eng/docs/library_install

Reply with quote

Advertisement

You can post new topics in this forum