gpt4 book ai didi

vba - Access 2013/2016不支持treeview控件,报错 "User defined type not defined"

转载 作者:行者123 更新时间:2023-12-04 16:47:12 25 4
gpt4 key购买 nike

我有一个 VBA 项目可以完美运行到 Windows 7(32.64 位)和 Office 2010。但是当我尝试在 Office 2013 或 2016 上运行它时。它不会加载 TreeView 控件并在以下位置出现错误:

私有(private) SelectedNode 作为 MSComctlLib.node

我已经尝试过的是:

  1. 彻底关注这篇文章 http://thesmileycoder.com/treeview-working-in-access2013/

  2. 在 SYSTEM32 和 SYSWOW64 文件夹中多次重新注册 MSCOMCTL.OCX/MSCOMCT2.OCX。

请提供任何帮助!

最佳答案

感谢您说明您使用的是 Office 64 位。

你应该看到这个 article

特别是部分:

Most things included in the 32-bit version of Office are included in the 64-bit version of Office.

The following are some things not in the 64-bit version of Office.

ActiveX controls library, ComCtl - This library contains ActiveX controls used to build solutions. It is most commonly used in Microsoft Access, Microsoft Excel, and Microsoft Word.

SharePoint List control The list view in SharePoint Technology isn’t available in 64-bit version of Office.

其次是:

ActiveX controls library, ComCtl - Any solutions using these controls don’t work. No good alternatives are available for some of these controls.

编辑还有这个page 2010 年的详细说明:

Native 64-bit processes in Office 2010 cannot load 32-bit binaries. This includes the common controls of MSComCtl (TabStrip, Toolbar, StatusBar, ProgressBar, TreeView, ListViews, ImageList, Slider, ImageComboBox) and the controls of MSComCt2 (Animation, UpDown, MonthView, DateTimePicker, FlatScrollBar).These controls were installed by previous versions of Microsoft Office and are installed by 32-bit Office 2010. An alternative must be found for existing Microsoft Office VBA solutions that utilize these controls when the code is migrated to 64-bit Office 2010. 64-bit Office 2010 does not provide 64-bit versions of the Common Controls.

关于vba - Access 2013/2016不支持treeview控件,报错 "User defined type not defined",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37612367/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com