"software" 更新后将无法加载用户表单
Userform won´t load after "software" update
我在 Office 365 版本中创建了一个包含 2 个用户表单的 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 中删除日期选择器控件,它只会显示第二个错误。
如果你 google 你会发现例如这个:
Download the MSCOMCTL.ocx in Microsoft Download.
On search menu / Cortana search command prompt and run it as administrator by right clicking it.
Copy the MSCOMCTL.ocx file to C:\Windows\SysWOW64.
Navigate the command prompt to the location C:\Windows\SysWOW64 and type regsvr32 mscomctl.ocx.
同时执行 regsvr32 mscomctl.ocx 和 mscomct2.ocx
我在 Office 365 版本中创建了一个包含 2 个用户表单的 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 中删除日期选择器控件,它只会显示第二个错误。
如果你 google 你会发现例如这个:
Download the MSCOMCTL.ocx in Microsoft Download.
On search menu / Cortana search command prompt and run it as administrator by right clicking it.
Copy the MSCOMCTL.ocx file to C:\Windows\SysWOW64.
Navigate the command prompt to the location C:\Windows\SysWOW64 and type regsvr32 mscomctl.ocx.
同时执行 regsvr32 mscomctl.ocx 和 mscomct2.ocx