Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitleSelect newly added items in a ListBox
Keywords
CategoriesControls
 
After adding the item, use the ListBox's NewIndex property to get the new item's index. Then set Selected True for that index.
 
' Add the new item.
lstItems.AddItem txtNewItem.Text

' Select the new item.
lstItems.Selected(lstItems.NewIndex) = True
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated