Compile Error with a lib...

Trying to compile a book sample I get an error at the top of a subroutine written as the following:

Private Sub TreeView_NodeClick(ByVal Node As ConctlLib.Node)

   The components listed in the projects are are the following:

   1) Microsoft Common Dialog Controls      for comdlg32.ocx

   2) Microsoft Windows Common Controls 6.0 for mscomctl.ocx

   with the .ocx's registered what other components are required to compile the comctlLib.Node
   data type?
Who is Participating?
amebaConnect With a Mentor Commented:
Type ConctlLib should be ComctlLib
Private Sub TreeView_NodeClick(ByVal Node As ComctlLib.Node)

opticalAuthor Commented:
Yes I know I typed it wrong.  The function has a "m"

    Private Sub TreeView_NodeClick(ByVal Node As ComctlLib.Node)
7 new features that'll make your work life better

It’s our mission to create a product that solves the huge challenges you face at work every day. In case you missed it, here are 7 delightful things we've added recently to monday to make it even more awesome.

what is the error

If you are using Common Controls 6.0,
Replace: (ByVal Node As ComctlLib.Node)
with (ByVal Node As Node).
Version 6 is MSComctlLib.
opticalAuthor Commented:
(ByVal Node As Node) this is what I also tried, the compiler passed this, but when a subrountine for images the ".listimage" method failed.
Well, do the same thing.
Search your project for ComctlLib, and remove or replace with MSComctlLib.
Or you can download upgrade wizard from owners area.
Or I can send you instructions for manually upgrading from version 5 to 6.
HOWTO: Upgrade Project to Use the New MSCCOMCTL.OCX in VB6
Last reviewed: August 7, 1998
Article ID: Q190952
The information in this article applies to:
Microsoft Visual Basic Learning, Professional, and Enterprise Editions for
Windows, version 6.0
The following controls are not automatically updated when a Visual Basic
5.0 project is loaded by Visual Basic 6.0:
The project must be manually upgraded to the new Visual Basic 6.0 controls:
The new controls are not backward compatible with the older versions and,
in accordance with the rules of COM, were given new file names and new
GUIDs. This prevents your application from breaking existing applications
that use the older controls. Because the new controls have new names and
GUIDs, they also have new Typelibs. When you load a Visual Basic project,
it checks the Typelib version. However, Visual Basic does not know the
Controls were updated because the Typelib for the new controls have a
different GUID than the Typelib for the old controls.
To upgrade a project to the newer version, you must do the following:
1.Open the VBP file in a text editor, such as Notepad, and change the
line(s) that reference the old version of the OCX to the following:

Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCTL.OCX
Object={86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCT2.OCX
Object={65E121D4-0C60-11D2-A9FC-0000F8754DA1}#2.0#0; MSCHRT20.OCX

Save and close the VBP file.
2.Open any FRM file (or CTL file) that uses one of the above controls in a
text editor, and change the line(s) that reference the old version of the
OCX to the following:

Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{65E121D4-0C60-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCHRT20.OCX"

3.Change all text that references the old libraries to the new library
names. This means that you need to replace ComCtlLib, Comctl2, and
MSChartLib with MSComCtlLib, MSComCtl2, and MSChart20Lib. For example,
4.Save and close the file. When you open the project in Visual Basic 6.0,
it will use the new MSCOMCTL.OCX, MSCOMCT2.OCX and/or MSCHRT20.OCX
1.IMPORTANT: Before you edit your VBP, FRM, or CTL files, you should backup
all of the files in your project.
2.While the objects listed in step 1 and 2 are very similar, they are not
identical and the upgrade will not work properly if each is not copied
exactly to the correct file.
3.If you get a message stating that the header is corrupt when you attempt
to load the project, you have probably made a copy error. Please go to your
backup and repeat the process.
4.If you prefer to continue using the older versions of these controls,
comctl32.ocx and comct232.ocx are included on the Visual Basic 6.0 product
CD-ROM in the \OS\System directory. Mschart32.ocx resides in the
\Common\Tools\VB\Controls directory.

opticalAuthor Commented:
Still need to investigate your suggestion.

Thank you for your help.
opticalAuthor Commented:

After changing the Subroutine call to
Private Sub tvData_NodeClick(ByVal Node As MSCOMCTLLIB.Node)

with an "As MSCOMCTLLIB.Node" and recieved an error at the
following function and method ".ListImages" recieved an error.

Private Sub LoadImages()
    'Specifies images used for the 2 imagelist controls
    Dim liListView As ListImage
    Set liListView = imSmall.ListImages.Add(, "Small", LoadPicture(SMALL_COLUMN))
    Set liListView = imLarge.ListImages.Add(, "Large", LoadPicture(LARGE_COLUMN))
    lvwData.Icons = imLarge
    lvwData.SmallIcons = imSmall
End Sub


Same as instructed in the KnowledgeBase notes you sent.
    Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCTL.OCX

As instructed in the notes I looked for any code to


and there was none.  


After I saved the change additions to the code by text editor and
compiled the code the 'Sub LoadImages' still has an error
at ".ListImages"

      and the compiler reported "Method or Data Reference Not Found".


Please investigate this I need to see this VB6 book example work
so I can modify it and write my own code with image for a
tree view.

Thank you,
opticalAuthor Commented:
Yes, Fixed now.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.