Article ID: 165501
Article Last Modified on 11/23/2006
A1: Year B1: Month C1: Day
A2: 1996 B2: February C2: 23
A3: 1997 B3: March C3: 18
A4: 1998 B4: September C4: 7
A5: 1999 B5: November C5: 3
Property Value
------------------------------
BoundColumn 1
ColumnCount 3
ColumnHeads True
RowSource Sheet1!A2:A5
Private Sub ListBox1_Change()
Dim SourceData As Range
Dim Val1 As String, Val2 As String, Val3 As String
'Get Range that the ListBox is bound to
Set SourceRange = Range(ListBox1.RowSource)
Val1 = ListBox1.Value
'Get the value of the second column
Val2 = SourceRange.Offset(ListBox1.ListIndex, 1).Resize(1, 1).Value
'Get the value of the third column
Val3 = SourceRange.Offset(ListBox1.ListIndex, 2).Resize(1, 1).Value
'Concatenate the three values together and display them in Label1
Label1.Caption = Val1 & " " & Val2 & " " & Val3
End Sub
120802 Office: How to Add/Remove a Single Office Program or Component
Additional query words: XL97 multi-column
Keywords: kbhowto kbprogramming kbui KB165501