VBAフォームのリストの全選択ON/OFF

ループして SelectedをTrue/Falseする

Private Sub cmd全選択_Click()
    Dim iintLoop As Integer

    With Me!lstResult
        For iintLoop = 0 To .ListCount - 1
           .Selected(iintLoop) = True
         Next iintLoop
    End With
End Sub


Private Sub cmd全解除_Click()
   Dim iintLoop As Integer
 
    With Me!lstResult
        For iintLoop = 0 To .ListCount - 1
          .Selected(iintLoop) = False
        Next iintLoop
    End With
 
End Sub