At this moment I'm working on a MS Access database, and I have difficulties with the library MSCOMCTL.OCX
.
The problem is the following: given Windows 7 x64
, Microsoft Office 2010 x64
and MSCOMCTL.OCX v6.1.98.34
(which was registered with the help of regsvr32
in the folder SysWOW64
), I can't use the TreeView (MsComCtlLib.TreeCtrl.2
class) present in some forms of the database. Every time the code approaches any TreeView's (read, Node's) property, I receive the following message:
"Object doesn't support this property or method" (Error 438)
while in Windows 7 x32
the database works fine.
Trying to understand what's wrong, I discovered that the library Microsoft Windows Common Controls 6.0 (SP6)
exists in the list seen in the 'References...' dialog and is checked, but I don't see Microsoft TreeView Control 6.0
in the list of available ActiveX Objects when I'm in the Constructor mode.
Following some solutions found in the Internet, I executed regedit.exe and saw that there are two "folders" in the path HKEY_CLASSES_ROOT\TypeLib\{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}
, "2.0"
and "2.1"
. Besides, the path to the file MSCOMCTL.OCX
is in "2.1"
, while "2.0"
is not also empty - it contains PrimaryInteropAssemblyName
property for example, which isn't present in "2.1"
.
So, what should I do to make TreeViews in my database work? As I've mentioned before, I saw some solutions, but I'm afraid to use them because the computer, where the database is in, is not mine and it's undesirable to make the changes, which can affect security of the system.
The version of MSCOMCTL that is installed by default is not 64-bit compatible. You're unfortunately out of luck. No amount of modifying the registry is going to make a 32-bit only control work in 64-bit office.
However, MS apparently includes a 64-bit compatible version of MSCOMCTL with Office 365 ProPlus installations (source). You can consider buying that, or obtaining it through other means.