Hi. Is there anything wrong with this command? It somehow doesn't work. Private Sub BidList_Initialize() Dim i As Long Me.ListBox3.AddItem "Customer" Me.ListBox3.List(ListBox3.ListCount - 1, 1) = "Value" Me.ListBox3.Selected(0) = True For i = 2 To Sheet1.Range("A100000").End(xlUp).Offset(1, 0).Row A = Application.WorksheetFunction.CountIf(Sheet1.Range("A" & 2, "A" & i), Sheet1.Cells(i, 1)) If A = 1 Then Me.ListBox3.AddItem Sheet1.Cells(i, 1) End If Next i For r = 1 To Me.ListBox3.ListCount - 1 B = Application.WorksheetFunction.SumIf(Sheet1.Range("A:A"), Me.ListBox3.List(r, 0), Sheet1.Range("B:B")) Me.ListBox3.List(r, 1) = B & ".00" Next r End Sub
Dear Tracee Thanks for comments this ICode just Change Userform name and try Ok this working Nothing wrong Private Sub UserForm_Initialize() Dim i As Long Me.ListBox3.AddItem "Customer" Me.ListBox3.List(ListBox3.ListCount - 1, 1) = "Value" Me.ListBox3.Selected(0) = True For i = 2 To Sheet1.Range("A100000").End(xlUp).Offset(1, 0).Row A = Application.WorksheetFunction.CountIf(Sheet1.Range("A" & 2, "A" & i), Sheet1.Cells(i, 1)) If A = 1 Then Me.ListBox3.AddItem Sheet1.Cells(i, 1) End If Next i For r = 1 To Me.ListBox3.ListCount - 1 B = Application.WorksheetFunction.SumIf(Sheet1.Range("A:A"), Me.ListBox3.List(r, 0), _ Sheet1.Range("B:B")) Me.ListBox3.List(r, 1) = B & ".00" Next r End Sub
Thanks
Thanks you Sir.
I have a one question.
How i can use instead of listbox in a listview?
Sir, how to ascending data alphabetically and prevent duplicating same time in listbox1( as like above video)?? Help me Sir!!!!
Pl add voice how does code works.. Tq...
Thans sir.
Can you send me the download file links
I need to use numbers instead of customers
Listbox not work more than 9 columns.if there is more than 9 column what can we do.
Thanks for watching. Follow. th-cam.com/video/j4KZEy0Yw0Y/w-d-xo.html
Hi. Is there anything wrong with this command? It somehow doesn't work.
Private Sub BidList_Initialize()
Dim i As Long
Me.ListBox3.AddItem "Customer"
Me.ListBox3.List(ListBox3.ListCount - 1, 1) = "Value"
Me.ListBox3.Selected(0) = True
For i = 2 To Sheet1.Range("A100000").End(xlUp).Offset(1, 0).Row
A = Application.WorksheetFunction.CountIf(Sheet1.Range("A" & 2, "A" & i), Sheet1.Cells(i, 1))
If A = 1 Then
Me.ListBox3.AddItem Sheet1.Cells(i, 1)
End If
Next i
For r = 1 To Me.ListBox3.ListCount - 1
B = Application.WorksheetFunction.SumIf(Sheet1.Range("A:A"), Me.ListBox3.List(r, 0), Sheet1.Range("B:B"))
Me.ListBox3.List(r, 1) = B & ".00"
Next r
End Sub
Dear Tracee Thanks for comments
this ICode just Change Userform name and try Ok this working
Nothing wrong
Private Sub UserForm_Initialize()
Dim i As Long
Me.ListBox3.AddItem "Customer"
Me.ListBox3.List(ListBox3.ListCount - 1, 1) = "Value"
Me.ListBox3.Selected(0) = True
For i = 2 To Sheet1.Range("A100000").End(xlUp).Offset(1, 0).Row
A = Application.WorksheetFunction.CountIf(Sheet1.Range("A" & 2, "A" & i), Sheet1.Cells(i, 1))
If A = 1 Then
Me.ListBox3.AddItem Sheet1.Cells(i, 1)
End If
Next i
For r = 1 To Me.ListBox3.ListCount - 1
B = Application.WorksheetFunction.SumIf(Sheet1.Range("A:A"), Me.ListBox3.List(r, 0), _
Sheet1.Range("B:B"))
Me.ListBox3.List(r, 1) = B & ".00"
Next r
End Sub
Send this file