我在Office 365版本中用两个用户表单创建了一个VBA项目。但是,经过最近的更新(安装了新的Office的新计算机),用户表单无法加载。我还没有发现Excel版本之间的差异,因为所有的版本都是相互匹配的。
我认为这是一个与数据报器控件有关的问题,但即使在该控件被移除之后,错误也会出现。我还证实了Excel在两台计算机上都是32位版本。
Option Explicit
Public Sub Menu() <-Shortcut runs this
UserForm2.Show
End Sub
Private Sub UserForm_Initialize() <-Userform2 Initializes
Set UF = New UserForm1 <- Error
Do stuff in UserForm2
End Sub当数据报童控件在UserForm1中时,收到的错误是:
Could not read some objects since they are´nt availible on this computer紧接着是
Complie error in hidden modul UserForm1.
Error usally shows when the code is incomapitble
with the app version, platform or architecture.以下是该项目的参考资料:
VBA
Excel 16 Obj. Lib.
OLE Automation
Office 16 Obj. Lib.
Forms 2 Obj. Lib.
Common Controls-2 6.0 (SP6)我的知识不足,因为我认为这是64位问题。如果我从UserForm1中删除数据报头控件,它只显示第二个错误。
发布于 2019-09-12 06:24:02
如果你搜索它,你会发现,例如:
在Microsoft下载中下载MSCOMCTL.ocx。 在“搜索”菜单/ Cortana搜索命令提示符上,右键单击该命令,以管理员身份运行它。 将MSCOMCTL.ocx文件复制到C:\Windows\SysWOW64 64。 将命令提示符导航到位置C:\Windows\SysWOW64 64并键入regsvr32 mscomctl.ocx。
做regsvr32 mscomctl.ocx和mscomct2.ocx
https://stackoverflow.com/questions/57868502
复制相似问题