Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Excel VBA throws error "Class Not Registered" even though WinSCPnet.dll is successfully registered

Did you read this?
https://winscp.net/eng/docs/library_install#side-by-side
Try removing all registrations using /comregistration and start from the scratch.
Davyb01

Excel VBA throws error "Class Not Registered" even though WinSCPnet.dll is successfully registered

In the following text eight pictures are referenced. These are various screen shots relevant to this problem. They are in a single zip file, Problem Pictures.zip. The pictures are in bmp format. Each picture file name begins with 01 through 08. They are in order of reference in the text.

When VBA code encounters the first instance of an instruction that uses WinSCPnet.dll, it throws the error "Class Not Registered". Here is an image of the error 01 Class Not Registered.bmp.
The VBA code has worked for two months just fine. I don't believe there is any error in the VBA code. This error started after I downloaded a change to the operating system.
After the download, since the problem existed, I updated WinSCP. Here is the folder containing both WinSCP and WinSCPnet.dll. 02 WinSCP Folder.bmp. Here are the properties for the WinSCP file: 03 Winscp Properties.bmp. Here are the properties for the
WinSCPnet.dll file: 04 Winscpnet.dll.bmp.

After update to the current version of WinSCP, the program worked just fine. No problems. However the "Class Not Registered" Excel problem persisted.
I proceeded to register WinSCPnet.dll. First I used RegAsm.exe. Here is the RegAsm program in its folder: 05 After Regasm Add.bmp. Here is the CMD code to perform the registration. 06 CMD Registration.bmp. Here is the Excel Reference display, which shows a correct registration. 07 Wrapper Registrated.bmp
For further information, in case it is relevant, here is the folder for the Microsoft.Net folder list: 08 Framework Folder (Partial).bmp
Also, here are the versions I am now using:
1. WinSCP – 5.17.10.11087
2. Last version – Don’t know last version, but was the latest before current version
3. Microsoft OS – Windows 10 Pro, Version 20H2, Build 19042.928

Could this problem be due to a bad version of WinSCPnet.dll?