我在VM上有一个Excel加载项,它使用"Microsoft TreeView Control, version 6.0"作为Microsoft Windows Common Controls 6.0(SP6)的一部分,位于C:\ Windows \ system32 \ MSCOMCTL.ocx . 使用TreeView控件的窗体上的属性窗口将控件显示为[TreeView控件名称] TreeView3 . 一切都很好,我没有收到任何错误 .

我也有相同的Excel加载项的工作VM的副本,但我收到一个Microsoft Forms错误,上面写着“无法加载对象,因为它在此计算机上不可用” . 当我打开Excel和加载项加载 .

我可以使用相同的"Microsoft TreeView Control, version 6.0"(相同的文件位置和引用)重新创建表单,但是此TreeView控件显示为[TreeView控件名称] TreeView2,并且不再出现错误 .

不是重新创建使用TreeView2控件的所有表单,而是如何防止问题首先发生?机器显然不是精确的副本 . 除了在工作机器上安装的.NET v4之外,我不知道改变了什么已经改变了问题 . 我的理解是,只要在出现错误的计算机上安装.NET v4,就不会影响Windows公共控件 .

EDIT:
安装以下并且它不起作用:
https://www.microsoft.com/en-us/download/details.aspx?id=10019

还拍了一下并安装了.NET v4,但仍然没有运气 .

Specifications on working machine:
Windows 7 Professional SP1
Excel 2010,版本:14.0.7162.5000(32位)
Computer \ HKLM \ SOFTWARE \ Microsoft \ NET Framework Setup \ NDP,它有v2.0.50727,v3.0,v3.5和v4

Specifications on machines with the issue:
Windows 7 Professional SP1
Excel 2010,版本:14.0.7162.5000(32位)
Computer \ HKLM \ SOFTWARE \ Microsoft \ NET Framework Setup \ NDP,它有v2.0.50727,v3.0,v3.5

EDIT #2: failed to mention that the machine with the issue is a 64-bit OS

Information from Registry for versions of TreeView controls on Working machine and Non-Working machine

工作机器
Computer \ HKEY_CLASSES_ROOT \ MSComctlLib.TreeCtrl \ CurVer - MSComctlLib.TreeCtrl.2

Computer \ HKEY_CLASSES_ROOT \ CLSID \ Version - 2.1

Windows 7 Professional SP1 32位

非工作机器
Computer \ HKEY_CLASSES_ROOT \ MSComctlLib.TreeCtrl \ CurVer - MSComctlLib.TreeCtrl.2

Computer \ HKEY_CLASSES_ROOT \ Wow6432Node \ CLSID \ Version - 2.0

Windows 7 Professional SP1 64位