However, during the past two months I’m getting the error “Class Not Registered”.
I have reported this problem some time ago, but I cannot find the report. Perhaps you can find it. I don’t think the previous report will help us here. You suggested I run
/comregistrationto get rid of previous registrations. I have done this successfully and have verified the deletions. Then I verified the registrations and that
WinSCPnet.dllfunctions are present. I can provide screenshots of all the steps I took if that would be helpful.
To simplify matters I have written a very small VBA macro in Excel. This macro shows the problem, and is included here in this problem report.
Option Explicit Sub MyTest1() Dim Mysessionoptions As New Session Mysessionoptions.Protocol = Protocol_Sftp Stop End Sub
- When I start execution of the macro on the second step (before executing it), VBA shows the step in yellow.
01 Before Execution
- When I start execution of the second step, VBA immediately stops with an error on the executable statement (shown in yellow).
02 After Execution
- I cleared the error and started the macro again. When I got to the statement with the error, I did not execute it. I deleted
Sessionword from the
Dimstatement and began to type in the word session. I immediately got the display of the available options. You can see from the screenshot (
03 DIM Statement) that
Sessionis available (in addition to
WinSCPnet.dlloptions. I believe this proves that the
WinSCPnet.dllis present and therefore, the registration was successful.
- I clicked on the
Sessionoption and the macro again came to the error statement. I believe this shows that the
Dimstatement was correctly interpreted by VBA and that, so far, we are not dealing with a VBA software error.
- Next, we consider
Mysessionoptionsstatement. Looking at the local’s window, we see that the variable
Mysessionoptionsis defined. There is no VBA error here.
04 Session Options
- I again executed the error statement and got the “Class Not Registered” error.
- You can do the same thing to verify what I have done.
Here is the version of Excel I am using. I believe that it is the current version for Windows 10.05
Here is the version of Windows I am using. I believe all updates are installed.
06 Windows Version
Here is the computer I am using.
07 Computer Version
Here are the references in Excel. This shows that the DLL file is registered.
Here is the version of WinSCPnet.dll I am using.
09 DLL File
Also, I have verified that WinSCP stand-alone (not controlled by VBA) works just fine.