KeyManager.LoadFile - DISP_E_MEMBERNOTFOUND

I'm trying to get our private key setup for an sftp connection and this works fine using the library sdk but when trying to use the SmartFTP Application object / pro scripting I get a [DISP_E_MEMBERNOTFOUND] exception generated in the line highlighted below.

objFTP = CreateObject("sfFTPLib.SFTPConnection")

objFTP.Host = My.Settings.SFTPAddress
objFTP.Port = 22
objFTP.Username = My.Settings.SFTPUsername

' load our private key
Dim keymanager As Object = CreateObject("sfFTPLib.KeyManager")
objFTP.PrivateKey = keymanager.LoadFile("C:\sftp-keys\smh-vrs.ppk", "mypassword")

Am I doing something wrong? Your help would be appreciated.

Many Thanks
Mark

What if you declare the keymanger as:
Dim keymanager As sfFTPLib.KeyManager

Please consider purchasing a licenes for the FTP Library if you require support for scripting since the Pro Edition does not offer support for scripting.

Thank you
Regards,
SmartFTP