Solved

Treeview in Vb6

Posted on 2011-03-24
5
569 Views
Last Modified: 2012-06-27
hi
  firstletter = mid(txtfields.text),1,1)
  tvtreeview.nodes(firstletter).children

but i am getting an error. What I need to know is how do I use a varibale and get the number of the children depending on what the first letter of the text box is.
  tvtreeview.nodes("A".children works fine. but I need to use my firstletter varible.
thanks very much for time and assistance
Urgent
0
Comment
Question by:cbbisu
  • 3
5 Comments
 
LVL 142

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 400 total points
Comment Utility
what about this:

firstletter = left(txtfields.text,1)
tvtreeview.nodes(firstletter).children

Open in new window

apart from that, if you still get an error, it's because there is no such treeview node with that "letter" as key

0
 

Assisted Solution

by:benny_ca
benny_ca earned 100 total points
Comment Utility
just try

  tvtreeview.nodes(cstr(mid(txtfields.text),1,1))).children
0
 

Accepted Solution

by:
cbbisu earned 0 total points
Comment Utility
hi angelll and benny

thanks both were correct and my was correct too the problem was what angell told me
that got me thinking. My tree had only capitals letter and my textbox was giving lower cases.
So I had to ucase(firstletter) then it worked

thanks so much for all your help. I will split it since I appreciate all your time and assistance
0
 

Author Comment

by:cbbisu
Comment Utility
experts exchange is a wonderful site
0
 

Author Closing Comment

by:cbbisu
Comment Utility
They gave me an idea that I realize that was not using capitals letters.

thanks
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now