Hello Gurus,
I have a multi-columns listbox which is single-select and also i have two textboxes.
How can I display the value of the second column in my second textbox?
I have the below code that display the columns in my Listbox:
Private Sub UserForm_Initialize()
Dim lngMyRow As Long
For lngMyRow = 2 To Cells(Rows.Count, "B").End(xlUp).Row
If StrConv(Range("T" & lngMyRow), vbUpperCase) = "WAITING FOR APPROVAL" Then
With ListBox1
.ColumnCount = 3
.ColumnWidths = "125;60;110"
.AddItem
.List(.ListCount - 1, 0) = Range("B" & lngMyRow)
.List(.ListCount - 1, 1) = Range("I" & lngMyRow)
.List(.ListCount - 1, 2) = Range("F" & lngMyRow)
End With
End If
Next lngMyRow
End Sub
And below to display the 1st column in my 1st textbox.
Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
UserForm1.txt_sc.Value = ListBox1.Value
End Sub
Thanks in advance!
Bookmarks