Home |
Search |
Today's Posts |
#2
![]() |
|||
|
|||
![]()
I have solved my problem thanks.
If you are interested here is snippet of the code [code] .txtFacility.Value = ListBox1.List(r, 8) Dim var() As String Dim x As Integer Dim y As Integer Dim st As String st = ListBox1.List(r, 8) x = InStr(1, st, Chr(13)) 'x = InStr(1, st, ",") var = Split(st, Chr(13)) 'var = Split(st, ",") For x = 0 To UBound(var) For y = 0 To Me.ListBox2.ListCount - 1 'If Me.ListBox2.ListIndex(y) = var(x) Then ' If InStr(1, UCase(Trim(Me.ListBox2.List(y, 0))), UCase(Trim(var(x))), vbTextCompare) 0 Then If StrComp(Me.ListBox2.List(y, 0), var(x), vbTextCompare) = 0 Then 'If UCase(Trim(Me.ListBox2.List(y, 0))) = UCase(Trim(var(x))) Then Debug.Print UCase(Trim(Me.ListBox2.List(y, 0))) Debug.Print UCase(Trim(var(x))) Me.ListBox2.Selected(y) = True Exit For End If Next Next [code] |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Selected ListBox item to TextBox | Excel Programming | |||
Adding items from Listbox to empty textbox | Excel Programming | |||
remove items from listbox together with add item | Excel Programming | |||
Retaining focus on a textbox / listbox item pair after validation = false. | Excel Programming | |||
ListBox Add Item based on criteria | Excel Programming |