473,386 Members | 1,803 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

No treeview reference

Seth Schrock
2,965 Expert 2GB
I'm trying to use an ActiveX treeview control. I was trying to declare it in VBA and discovered that there was no option for declaring a variable as MsComctlLib.TreeView. I'm assuming that this is a reference problem, but I can't find a reference that specifically says for the treeview and I can't find online what reference it requires. I also checked, and I don't have the MsComctlLib file on my computer which I would assume that I would need. Where can I get it and how do I add it to the references list?
Dec 24 '12 #1

✓ answered by TheSmileyCoder

Hi Seth
I believe it may be related to a issue in which Microsoft released a update to the MScomCtlLib which was incorrectly patched by microsoft, causing registry errors.

I believe if you follow the advice laid out in:
http://support.microsoft.com/kb/2597986
Your results should more closely match my video. If you do follow the advice, please let me know, so that I know to create a addendum of sorts to my treeview vid.

10 24162
zmbd
5,501 Expert Mod 4TB
Just because I'm dense.... you tried (now I'm speaking in version 2010 which is OFFICE14 on the hard-drive install:
Form in design mode.
Insert activex control
Microsoft Treview Control, Version 6.0

this either was not available or did not work?

Open VBA editor:
Tools
References
[X] Microsoft Office 14 Object Library
[X] Microsoft ActiveX Dataobjects 2.1 Library

You need "mscomctl.ocx" if I remember correctly. IN a WinXP install it is in the "windows\system32"


OK - I'm pushing 20 hours up time and I need to be back up and out within the next 5 hours so time for a nap

Merry Christmas to those who are in the 25th and Happy Christmas Eve that are in the same boat with me!

A sip of EggfNoggg..,..! !!!, !!!!! zzzzzzzzz
Dec 24 '12 #2
NeoPa
32,556 Expert Mod 16PB
Does Smiley's article not explain how to get hold of the library Seth?

I use Win XP still and the file is found on my system as :
C:\WINDOWS\system32\mscomctl.ocx

If you don't have this available then you need to get hold of and install it before trying to access it ;-)
Dec 24 '12 #3
Seth Schrock
2,965 Expert 2GB
@Z I'm using Access 2010 as well. Inserting the control worked just fine. My problem came in the VBA editor when trying to declare a variable as a treeview as Smiley had in his video
Expand|Select|Wrap|Line Numbers
  1. Dim tv As MsComctlLib.TreeView
I assumed that this meant that I needed the MsComctlLib file. I already had the reference to the Microsoft Office 14 Object Library selected, but not the Microsoft ActiveX Dataobjects 2.1 Library. However, adding that later didn't fix it.

I GOT IT! I found an article that said that Windows 7 x64 (what I have) stores its 32 bit drivers in the Windows\SysWOW64 folder (my office installation is 32 bit). In the References window, I browsed to that location, selected the MsComctl.ocx file which turns into the Microsoft Windows Common Controls 6.0 (SP6) reference. I selected it and it now works.

@ NeoPa No Smiley doesn't tell how to get a hold of the library. I might add a comment to his YouTube video and suggest explaining that.

One more question that might be a little off subject, but does anyone know how to add this reference when the user only has Microsoft Access Run-time 2010?
Dec 24 '12 #4
NeoPa
32,556 Expert Mod 16PB
You add it into the database as a developer Seth, so that it's already there when the user opens it.
Dec 24 '12 #5
Seth Schrock
2,965 Expert 2GB
Great! I don't have to worry about that then. Thanks NeoPa for that information and to everyone who posted trying to help me out. It is very much appreciated.
Dec 25 '12 #6
NeoPa
32,556 Expert Mod 16PB
Seth:
Great! I don't have to worry about that then.
Absolutely not :-)

Time to relax and join Z in an egg-nogg I think. Merry Christmas to all!
Dec 25 '12 #7
TheSmileyCoder
2,322 Expert Mod 2GB
Merry christmas to you all.

Usually when you design your form (as shown in the video) and insert the treeview active X control, my experience has always been that Access will automatically set the reference to the Microsoft Common Control Library (mscomctllib). See the video @ Treeview video @ time of Active X insertion

Did your approach not follow the path outlined above?
Dec 25 '12 #8
Seth Schrock
2,965 Expert 2GB
That is the way that I did it and the reference didn't come up until I manually added it. I'm not sure why it didn't. I was following along with your video and when I got to the loadTreeview function the first dim statement didn't work. Another anomaly that I have found is that the tree view object's properties (not the control properties) won't let me change the properties. I have had to make the changes (like the indent space) in VBA. Could this be for the same reason that the VBA reference didn't get made automatically?
Dec 25 '12 #9
TheSmileyCoder
2,322 Expert Mod 2GB
Hi Seth
I believe it may be related to a issue in which Microsoft released a update to the MScomCtlLib which was incorrectly patched by microsoft, causing registry errors.

I believe if you follow the advice laid out in:
http://support.microsoft.com/kb/2597986
Your results should more closely match my video. If you do follow the advice, please let me know, so that I know to create a addendum of sorts to my treeview vid.
Dec 25 '12 #10
Seth Schrock
2,965 Expert 2GB
I ran the update and now the treeview object properties are working correctly and the reference to the Microsoft Common Control Library is added automatically. Thanks Smiley!
Dec 26 '12 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: muralidharan | last post by:
WebForm1.aspx Code: <%@ Register TagPrefix="ComponentArt" Namespace="ComponentArt.Web.UI" Assembly="ComponentArt.Web.UI" %> <ComponentArt:TreeView id="TreeView1" Height="520"...
1
by: Access User | last post by:
I'm looking for complete documentation for the activex component "TreeView" in Access. I need a complete list of methods and properties, if such a thing exists. Paul
4
by: Jeroen Ceuppens | last post by:
Hi, I want to make something that adds a TreeNode to the end of TreeView, that TreeView Looks like + Level 1 + Level 2 + Level 3 - Level last
4
by: Ian Powell | last post by:
Hi I've got objects in an sorted ArrayList like: P:\ P:\\DOCS P:\\i386 P:\\i386\ASMS P:\\i386\ASMS\1000 P:\\i386\ASMS\1000\MSFT
2
by: Trond Hoiberg | last post by:
Let say i have a bunch of files. Logfiles that is stored in subfolders. Folder1 --logfile1 --logfile2 --logfile3 Folder2 --logfile1 --logfile2 I want to display these files using data from...
1
by: dillon_99 | last post by:
Hello, I have been working with the treeview control from Microsoft. Here is what I want to do: I have a function that returns a string: private string generateNodeString(ArrayList array)...
3
by: juvi | last post by:
Hi, I have got a problem with Treeview.Nodes.Clear() under VB2005. When I have some nodes in my treeview and a force to clear() all nodes then it seems to work, because the nodes are not visible....
2
by: Simon Rigby | last post by:
Hi folks, A bizarre problem I am having. I have a treeview which is bound to an XmlDataSource. The XMLDataSource.Data property is set to the result of a function that generates an XML...
2
by: casManG | last post by:
I am working on a small project that uses the treeview control in .net 2003. I have a tree view that I am sending to a sub in order to iterate through the nodes. Public Sub test (ByVal...
2
by: metalheadstorm | last post by:
hi i have a strange problem with my treeview i currently have in my pogram (in vb6) a week ago i placed a treeview on my form and did all the code for it etc and got it to work fine, i even made...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.