I would try something like this (I have done similar things with bit flags before, just nothing going the other way)
Quote:
For counter = 1 To 4
If (OutVal And (2 ^ (counter - 1))) = 2 ^ (counter - 1) Then
CurList.Selected(counter) = True
End If
Next
|