automation error VBA

Advertisement

utb2b
Joined:
Posts:
2

automation error VBA

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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,517
Location:
Prague, Czechia

Re: automation error VBA

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?

Reply with quote

utb2b
Joined:
Posts:
2

Re: automation error VBA

martin 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.

Reply with quote

Advertisement

You can post new topics in this forum