Hello all,
I need help why this code is working for the first textbox only not working to add value another textbox?
How to code to remove in textbox 1 to 1 x 1
Thanks for the Help.
Private Sub cmdList_Click()
Dim a, i As Long, n As Long, w()
ActiveSheet.Unprotect ("@Chandria2017")
a = Sheets("DataRecord").Cells(1).CurrentRegion.Value
' nn = 10
For i = 5 To UBound(a, 1)
If CStr(a(i, 10)) = Me.txtSearch.Value Then
n = n + 1
ReDim Preserve w(1 To n)
w(n) = Application.Index(a, i, Array(11, 7, 5, 6, 10))
End If
Next
If n > 0 Then
If n > 1 Then
listSearch.listSupply.List = Application.Index(w, 0, 0)
listSearch.Show
Else
listSearch.listSupply.Column = w(1)
End If
End If
End Sub
Private Sub listSupply_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Dim i As Long, x
nn = nn + 1
x = Array("q", "u", "pn", "d", "mr")
With listSearch.listSupply
For i = 0 To UBound(x)
frmPO(x(i) & nn).Value = .List(.ListIndex, i)
Next
.RemoveItem .ListIndex
' If nn = 10 Then
' MsgBox "already full"
' End If
End With
End Sub
Bookmarks