Does TreeView control work with 64-bit Excel?

Leon Lai
Lounger
Posts: 47
Joined: 12 Sep 2021, 14:50

Does TreeView control work with 64-bit Excel?

Post by Leon Lai »

Hello,

I just heard of the TreeView control yesterday morning, and I had the intuition that I could develop a great Excel Add-in for my company using TreeView.

So, I learned everything I could about TreeView, and tried my hand with some basic samples. All VBA codes on TreeView worked correctly.

----

I just got a nasty surprise:
I read from a website that " TreeView Control (like all non built-in ActiveX controls) cannot be used in 64-bit versions of Office."
----

I immediately checked my bitness on File > Account > About Excel. It says:

Microsoft Excel 2019 MSO (Version 2111 Build 16.0.14701.20206) 64-bit

-----
I don't understand: I did not have any problems using the TreeView in VBE. Yet my Excel seems to be 64-bit.

I am concerned that after spending months developing my add-in (based on TreeView), I finally find that some feature does not work, and I have to scrap the whole project.

----
Please advise. Should I start work on the VBE's TreeView? Thanks

Leon

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Does TreeView control work with 64-bit Excel?

Post by HansV »

When Microsoft first released a 64-bit version of Office, none of the ActiveX controls worked.
But they released a 64-bit version of the Microsoft Common Controls (of which TreeView is a part) for 64-bit Office 2016 and later (including Microsoft 365).
It doesn't work in 64-bit Office 2010 and 2013.
So as long as all your users have Office 2016, 2019 or 2021, or Microsoft 365, you should be able to use the TreeView control in your add-in.
Best wishes,
Hans

Leon Lai
Lounger
Posts: 47
Joined: 12 Sep 2021, 14:50

Re: Does TreeView control work with 64-bit Excel?

Post by Leon Lai »

Hello HansV

Thanks a lot.

Leon

Peter T
NewLounger
Posts: 18
Joined: 27 Dec 2021, 12:17

Re: Does TreeView control work with 64-bit Excel?

Post by Peter T »

Hello Leon,

We made an alternative VBA Treeview some years ago to solve the problem you describe, essentially two class modules which you can drop in to your project. It works in all Excel and Access versions since 2007, 32 and 64 bit. It doesn't seem possible to post the link here but just search 'jkp treeview' without the apostrophes.

There's also a much more powerful 'pro' version available.

Peter Thornton

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Does TreeView control work with 64-bit Excel?

Post by HansV »

Hi Peter,

Welcome to Eileen's Lounge, and thanks for mentioning your TreeView using native controls!
For others: here is the link: An MSForms (all VBA) treeview for Access, Excel And Word
Best wishes,
Hans

Peter T
NewLounger
Posts: 18
Joined: 27 Dec 2021, 12:17

Re: Does TreeView control work with 64-bit Excel?

Post by Peter T »

Hi Hans,

Thanks for posting the link.

If I recall you posted a simple treeview example for for use with Access and it's still in the demo eight years later;)

Peter T

cnan_bv
NewLounger
Posts: 1
Joined: 27 Sep 2023, 08:11

Re: Does TreeView control work with 64-bit Excel?

Post by cnan_bv »

HansV wrote:
13 Dec 2021, 10:05
When Microsoft first released a 64-bit version of Office, none of the ActiveX controls worked.
But they released a 64-bit version of the Microsoft Common Controls (of which TreeView is a part) for 64-bit Office 2016 and later (including Microsoft 365).
It doesn't work in 64-bit Office 2010 and 2013.
So as long as all your users have Office 2016, 2019 or 2021, or Microsoft 365, you should be able to use the TreeView control in your add-in.
Hi HansV,

I have this client with MSO 2016 64 bit that cannot use my excel VBA app that includes a TV control written in MSO Excel 2016 32 bit.
I installed this version of MSO 2016: (16.0.4266.1001) 64 bit but there is not TV control to recreate my userform as original.
Is there any solution to this?
Could it be that he is missing some Office updates?

thanks!
CN

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Does TreeView control work with 64-bit Excel?

Post by HansV »

Welcome to Eileen's Lounge!

See this article: The Microsoft TreeView Control in 64bit Access. It should apply to Excel too.
Best wishes,
Hans