Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

node selection

Posted on 1998-12-06
6
Medium Priority
?
165 Views
Last Modified: 2010-05-03
how do we select a particular node in a treeview? Or what is the equivalent for treeview in the following  example of listbox.

private sub form_load()

list1.listindex= 0

end sub
0
Comment
Question by:mailsuhail
  • 3
  • 2
6 Comments
 

Author Comment

by:mailsuhail
ID: 1448451
Edited text of question
0
 
LVL 7

Accepted Solution

by:
Inteqam earned 0 total points
ID: 1448452
treeview.nodes.item(1).selected=true

0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1448453

set treeview1.selecteditem = treeview1.nodes(anode.key)

Where treeview1 is the treeview control and anode is a treeview  node

or like Inteqam said
treeview.nodes.item(1).selected=true

0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 7

Expert Comment

by:Inteqam
ID: 1448454
you can use my answer for multi selection , i think

0
 

Author Comment

by:mailsuhail
ID: 1448455
when i pasted this code (suggested by Inteqam) in the Form_load event  it worked fine but when i tried it in Command_clik event it didn't work. Why?
0
 
LVL 7

Expert Comment

by:Inteqam
ID: 1448456
i think when clicking it , it will be selected automatically.
but make sure that the hide selection property of the tree view is false.

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

885 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