Option Explicit' 全选
Private Sub Command1_Click()
    Dim i As Long
    
    For i = 0 To Me.File1.ListCount - 1
        Me.File1.Selected(i) = True
    Next
End Sub' 得到选中的文件名(多选)
Private Sub Command2_Click()
    Dim i As Long
    Dim strFiles As String
    
    For i = 0 To Me.File1.ListCount - 1
        If Me.File1.Selected(i) Then
            strFiles = strFiles & Me.File1.List(i) & vbCrLf
        End If
    Next
    MsgBox strFiles
End Sub