Topic "automation error VBA"

Author Message
utb2b
[View user's profile]

Joined: 2014-01-14
Posts: 2
Hi Support,

I have got simple VBA program which help us to download files from SFTP server. It's working perfectly in mostly in all machines.

when I try to use the same excel in particular machine it throws automation error.

OS: Windows 7
WINSCP version: winSCP 5.1.7

we tried to uninstall winscp and unregister the tlb and dll. we try to install again and getting same error Automation Error. (object variable is not set.
below is the code.


Dim SFTPSession As New session
Dim SFTPSessionOptions As New sessionOptions

With SFTPSessionOptions
.Protocol = Protocol_Sftp
.HostName = txtHN.value
.UserName = txtUN.value
.password = txtPWD.value
.portnumber = txtPort.Value
.SshHostKeyFingerprint = txtHostkey.value
End With


SFTPSession.Open SFTPSessionOptions

Thanks in advance for your help and support.

Thanks,
utb2b
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
On what line does it throw?
Did you use a different version of the assembly on that machine before? It you did, did you unregister it?
_________________
Martin Prikryl
utb2b
[View user's profile]

Joined: 2014-01-14
Posts: 2
prikryl wrote:
On what line does it throw?
Did you use a different version of the assembly on that machine before? It you did, did you unregister it?


Thanks for your response.

With SFTPSessionOptions

in the above line it pops up Automation error.

Actually I was using winscp 5.1.7 . Yesterday, we tried to uninstall winscp 5.1.7 and unregister dll and tlb. we tried to install a winscp 5.5 and registered winscpnet.dll successfully. manual interface of winscp is working on that machine. But VBA macro pops up the same error message on the same line.

With SFTPSessionOptions .

Thanks in advance.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License