3

I have a VBA project which runs perfectly upto windows 7 (both 32,64 bit) and upto office 2010. But when i try to run it on office 2013 or 2016. It does not load treeview control and gives error at:

Private SelectedNode As MSComctlLib.node

The things i have already tried are:

  1. Followed this post thoroughly http://thesmileycoder.com/treeview-working-in-access2013/

  2. Re-registered MSCOMCTL.OCX/MSCOMCT2.OCX several times on both SYSTEM32 and SYSWOW64 folders.

Any help is appriciated!

yogeshgirnar
  • 29
  • 1
  • 3

1 Answers1

1

Thanks for clarifying that you're using Office 64-bit.

You should see this article

Specifically the section:

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.

Followed by:

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

EDIT And this page for 2010 spells it out in more detail:

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.

ThunderFrame
  • 8,851
  • 2
  • 24
  • 53