You need to attach an example of your workbook.
Hi, thanks for the reply. I tried to attached the example workbook but it said the file extension is invalid, so I post the code and screenshot below.
As you can see, I click the button once which increase the second column of each row by 1 successfully.
However, when I click the button second time, the rows that are not display in the scrollable listbox at the moment, fail to increase by 1 again
Below is the code in the example. Thank you so much.
Code
Private Sub CommandButton1_Click()
For i = 0 To lstProducts.ListCount - 1
lstProducts.List(i, 1) = lstProducts.List(i, 1) + 1
Next i
End Sub
Private Sub UserForm_Initialize()
Dim iCell As Long
VBA.Randomize
With lstProducts
.ColumnCount = 2
.ColumnWidths = "120;60;50"
.List = Worksheets("Product").Range("a1").CurrentRegion.Value
End With
End Sub
Display More