I have a user form with 2 multi select listboxes populated with named ranges. The first works fine and loops through all the selected scouts. I can select multiple items in the second list (ReqList) and it will find the first selected item, execute the code to write a value correctly then loop through as if no other items were selected. When I break the code and go look at the form, there are no highlighted items after the first for/next statement. How is ReqList getting deselected? Thank you for your help in advance.
Code:
Private Sub SaveButton_Click()
Set ws = Worksheets("Summary")
For NumScout = 0 To ScoutList.ListCount - 1
If ScoutList.Selected(NumScout) = True Then
For numreq = 0 To ReqList.ListCount - 1
scoutcolumn = NumScout + 3
If ReqList.Selected(numreq) = True Then
ws.Range("Scout").Cells(numreq + 1, scoutcolumn).Value = "A"
ReqList.Selected(NumReq) = False
End If
Next
Else
ScoutList.Selected(NumScout) = False
Next