Function GetFolder() As String
Dim dlgOpen As FileDialog
Dim i As Long, j As Long
Set dlgOpen = Application.FileDialog(msoFileDialogOpen)
With dlgOpen
.AllowMultiSelect = True
.Show
End With
i = dlgOpen.SelectedItems.Count
If i > 0 Then
GetFolder = ""
For j = 2 To i
GetFolder = GetFolder & dlgOpen.SelectedItems(j) & ";"
Next
j = 1
GetFolder = GetFolder & dlgOpen.SelectedItems(j)
Else
GetFolder = dlgOpen.InitialFileName '或GetFolder = CurDir() & "\"
End If
Set dlgOpen = Nothing
End Function