Dear Guru
how can i sort listbox with vbTab my code is
i want to sort second column poin score bigger is in the top any help please
thanks
how can i sort listbox with vbTab my code is
Code:
Dim i As Long, TPts As Long, LPts As Long Dim User As String, LText As String If List2.ListCount = 0 Then 'default, just enter & exit List2.AddItem Text5.Text & vbTab & Text6.Text Exit Sub End If LText = LCase$(Text5.Text) 'case sensitive search TPts = Val(Text6.Text) 'text points For i = 0 To List1.ListCount - 1 User = Split(List2.List(i), vbTab)(0) 'user in list LPts = LCase$(Split(List2.List(i), vbTab)(1)) 'list points If LCase$(User) = LText Then 'in list? List2.List(i) = User & vbTab & LPts + TPts 'yes, set updated score Exit Sub ' & exit End If Next List2.AddItem Text5.Text & vbTab & Text6.Text 'not found so enter
thanks