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

msgambero

tengo el mimo problema error "clase no registrada" ,...

Buenas tardes tengo el mimo problema error "clase no registrada" ,... mi windows 10 es de 64b,pero el Access 2021 es de 32b.

Lo he probado con el ejemplo que aportan para vba.
martin

Re: Reply to Martin. Windows is 64-bit, Excel is 32-bit.

Sorry, I do not know how to help you. This is beyond my knowledge.
For test, I've followed the instructions step-by-step now, and everything works as expected (I have 64-bit Excel, but I do not think it's related).
https://winscp.net/eng/docs/library_vb
DaveBrower

Reply to Martin. Windows is 64-bit, Excel is 32-bit.

My Windows is 64-bit. My Excel is 32-bit.
martin

Re: Reply to Martin

I'm missing 64-bit registration. Is your Windows 32-bit or 64-bit? And Excel?
DaveBrower

Reply to Martin

Martin:
Thank you for looking at this problem. I am sending you a text file of the entire CMD screen when I executed WinSCP.com /comregistration. The file name is: First Problem Reply.txt. I look forward to hearing from you.
martin

Re: Class Not Registered error in VBA

Restart your machine and post what does WinSCP with /comregistration parameter show.
DaveBrower

Class Not Registered error in VBA

I’m trying to control WinSCP from Excel running on Windows 10. I have written a large VBA program which includes using WinSCP to download files from a web site. This program has worked fine until fairly recently.
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 /comregistration to get rid of previous registrations. I have done this successfully and have verified the deletions. Then I verified the registrations and that WinSCPnet.dll functions 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

I have single-stepped the macro and taken screenshots of what happened. In the text that follows, there are references to screenshots. They are numbered 01 to 09, and are included in the zip file Problem Report.zip.

  1. When I start execution of the macro on the second step (before executing it), VBA shows the step in yellow. 01 Before Execution
  2. When I start execution of the second step, VBA immediately stops with an error on the executable statement (shown in yellow). 02 After Execution
  3. 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 Session word from the Dim statement 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 Session is available (in addition to SessionOptions and other WinSCPnet.dll options. I believe this proves that the WinSCPnet.dll is present and therefore, the registration was successful.
  4. I clicked on the Session option and the macro again came to the error statement. I believe this shows that the Dim statement was correctly interpreted by VBA and that, so far, we are not dealing with a VBA software error.
  5. Next, we consider Mysessionoptions statement. Looking at the local’s window, we see that the variable Mysessionoptions is defined. There is no VBA error here. 04 Session Options
  6. I again executed the error statement and got the “Class Not Registered” error.
  7. You can do the same thing to verify what I have done.

It seems to me that there must be something wrong with WinSCPnet.dll or possibly the operating system. Can you help?
Here is the version of Excel I am using. I believe that it is the current version for Windows 10.05 Excel Version
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. 08 References
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.