Solved

node selection

Posted on 1998-12-06
6
161 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…

734 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