Hi,
I created an excel treeview control on a form in excel using Dim x(50) as Node and am trying to replicate it in AutoCAD vba. However, it's saying that Node is a user defined type though. How can I get a Node type to show up? Am I missing a reference or something?
Thanks!
Solved! Go to Solution.
Solved by norman.yuan. Go to Solution.
Neither Excel's VBA, nor AutoCAD VBA has a TreeView control built-in.
You are probably talking about the TreeView control from MSCOMCTL.OCX. And obviously you are using AutoCAD 2014/15 64-bit, which has 64-bit VBA. If so, you cannot use anything from MSCOMCTL.OCX, because it is 32-bit component. I do not think you can find a 64-bit equivalent Treeveiew component. As matter of fact, there are very few 64-bit COM controls you can choose from, except for the very basic ones coming with the VBA.
If your project needs fine UI elements, 64-bit VBA will not help at all. You either go back to Acad2013 64-bit (its VBA is still 32-bit), or use 32-bit AutoCAD2014/15. Or you just stop investing more effort on AutoCAD VBA.
Norman Yuan
if you are running 32-bit AutoCAD, what OS do you use? Win7/8 32bit or Win7/8 64-bit?
If you click VBA IDE menu Tools->References..., you'd likely find that some referenced library (Microsoft Common Controls (6,0), most possibly) is flagged as missing.
If it is Win 7/8 64bit, the MSCOMCTL.OCX is likely not registered. IN the "Refernces" dialog box, you can click "Browse" to select MSCOMSTL.OCX file, which will register it. After that you should be fine.
Again, if you are using AutoCAd 2014/15 64-bit, then there is no solution.
Norman Yuan