System.Windows.Forms对象停止在Excel VBA项目中创建

我已经在Excel中创建了一个使用 System_Windows_Forms.RichTextBox控件的VBA项目。

在VBA项目编辑器菜单中,加载项>参考我检查了“ System_Windows_Forms ”参考。

(引用的路径是C:\ Windows \ microsoft.NET \ Framework \ v4.0.30319 \ System.Windows.Forms.tlb)

这是现已停止工作的VBA代码:

Private Sub mySub()
    Dim dotnetRTFBox As System_Windows_Forms.RichTextBox
    Set dotnetRTFBox = New System_Windows_Forms.RichTextBox

现在,以“ Set dotnetRTFBox”开头的行显示:

Runtime error '429'
activeX component can't create object.

在过去3年中,我每2-3个月使用一次此宏,并且该宏正常运行。我上次使用它的时间是5/2019。但是现在它给了我错误。

我浏览了帮助页面ActiveX component can't create object or return reference to this object (Error 429)。作为可能的原因之一,它说:该课程未注册。

我使用了Nirsoft的activeXHelper和RegDllView,即使认为文件确实存在于指定位置,也没有工具显示System.Windows.Forms.tlb或System.Windows.Forms.dll被注册。

我该如何修理?

(我在64位W10 1809上使用32位Office 365 Personal,内部版本17763.864。)

chjnchen1 回答:System.Windows.Forms对象停止在Excel VBA项目中创建

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2918982.html

大家都在问