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
 
 
 
 
 
 
TitleMake two lists pick corresponding selections in VB .NET
Keywords.NET, VB.NET, ListBox, select, pick, corresponding
CategoriesVB.NET, Controls
 
Set the SelectedIndex property of the each list when the other's changes.
 
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As _
    System.Object, ByVal e As System.EventArgs) Handles _
    ListBox1.SelectedIndexChanged
    ListBox2.SelectedIndex = ListBox1.SelectedIndex
End Sub

Private Sub ListBox2_SelectedIndexChanged(ByVal sender As _
    System.Object, ByVal e As System.EventArgs) Handles _
    ListBox2.SelectedIndexChanged
    ListBox1.SelectedIndex = ListBox2.SelectedIndex
End Sub
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated