vba 缺少 Microsoft 通用控件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21597020/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Microsoft Common Controls missing
提问by mesx
I got a strange issue with my new PC, running Windows 7 x64 and MS Office 2013 x64: On my other Notebook (Windows 8.1 x64/Office 2013 x64) i've created an MS Access DB, that uses the Microsoft Treeview control Active-X. I cannot find this control on my PC and therefore not open the DB on the PC but only on my Notebook. The MSCOMCTL.OCX was missing on my PC, so i copied it from my notebook, placed it in the SysWOW64 folder and registered it with regsvr32 (both 32 and 64 bit) but still no Treeview (same for Listview or any other VB6 Active-X control). I've searched the net for clues and found much info, but nothing helped (including Object Library Not Registered When Adding Windows Common Controls 6.0).
我在运行 Windows 7 x64 和 MS Office 2013 x64 的新 PC 上遇到了一个奇怪的问题:在我的另一台笔记本电脑 (Windows 8.1 x64/Office 2013 x64) 上,我创建了一个 MS Access DB,它使用 Microsoft Treeview 控件 Active- X。我在我的 PC 上找不到这个控件,因此不能在 PC 上打开数据库,而只能在我的笔记本上打开。MSCOMCTL.OCX 在我的 PC 上丢失,所以我从我的笔记本中复制了它,将它放在 SysWOW64 文件夹中并使用 regsvr32(32 位和 64 位)注册,但仍然没有 Treeview(对于 Listview 或任何其他 VB6 Active- X 控制)。我在网上搜索了线索并找到了很多信息,但没有任何帮助(包括在添加 Windows 通用控件 6.0 时未注册对象库)。
When i manually add the MSCOMCTL.OCX reference to a new Access DB (by opening VBA Editor ==> Extras ==> References), the "MS Windows Common Control 6.0 (SP6)" appears in the reference list, but still no Treeview control available.
当我手动将 MSCOMCTL.OCX 引用添加到新的 Access DB 时(通过打开 VBA Editor ==> Extras ==> References),“MS Windows Common Control 6.0 (SP6)”出现在参考列表中,但仍然没有 Treeview控制可用。
I don't know what else to do...
我不知道还能做什么...
Any info about this are appreciated!
任何有关这方面的信息表示赞赏!
回答by Albert D. Kallal
You have to use a 32 bit version of Access. There is no x64 bit version of the common controls.
您必须使用 32 位版本的 Access。没有通用控件的 x64 位版本。
回答by ggv
You have to add it manually to your toolbox. Just create new useform in VBA Editor, click on it, go to View==>Toolbox, then right click on empty space there, select Additional Controls, place a checkmark by Microsoft Treeview control.
您必须手动将其添加到您的工具箱中。只需在 VBA 编辑器中创建新的 useform,单击它,转到 View==>Toolbox,然后右键单击那里的空白区域,选择 Additional Controls,勾选 Microsoft Treeview 控件。