Is it possible to add items to a listbox as selected without using a counter?
what I have is a multiselect listbox, and I am adding items and selecting them using a counter (see below), but is there a more cunning/succinct way of adding the items as selected? I keep thinking there should be...
Code
...
With ListBox1
.AddItem "Sample1"
.AddItem "Sample2"
.AddItem ""
iCount = 2
For Each CurCell In Worksheets(datasheet).Range(tempstring)
iCount = iCount + 1
If CurCell.Offset(0, 2).Value = 1 Then
.AddItem CurCell.Value
ListBox1.Selected(iCount) = True
Else
.AddItem CurCell.Value
End If
Next
End With
...
Display More