B
baha17
hi All,
I have a list box which displays the sheet names from 201 to 843(these
are the names of the worksheets).What I need,when I click on command
button if the checkbox1 is check then remove all the item less then
800 from the list. So far I made the below code but I only removes one
item less than 800.How can I remove all the items less than 800É
If CheckBox1.Value = True Then
Dim i As Long
For i = 0 To Me.ListBox1.ListCount - 1
If Me.ListBox1.List(i) < 800 Then
Me.ListBox1.RemoveItem (i)
Exit Sub
End If
Next i
End If
Thanks for help and happy new year.
I have a list box which displays the sheet names from 201 to 843(these
are the names of the worksheets).What I need,when I click on command
button if the checkbox1 is check then remove all the item less then
800 from the list. So far I made the below code but I only removes one
item less than 800.How can I remove all the items less than 800É
If CheckBox1.Value = True Then
Dim i As Long
For i = 0 To Me.ListBox1.ListCount - 1
If Me.ListBox1.List(i) < 800 Then
Me.ListBox1.RemoveItem (i)
Exit Sub
End If
Next i
End If
Thanks for help and happy new year.