Public Function getFileName(blnAllowMultiSelect As Boolean) As String
'需要引用Office11 Object Libray
'获得文件路径及名称
'blnAllowMultiSelect是否复选
Dim fd As FileDialog
Dim vrtSelectedItem As Variant
Set fd = Application.FileDialog(msoFileDialogFilePicker)
With fd
.AllowMultiSelect = blnAllowMultiSelect
.InitialFileName = CurrentProject.Path
If .Show = -1 Then
For Each vrtSelectedItem In .SelectedItems
getFileName = getFileName & ";" & vrtSelectedItem
Next
getFileName = Right(getFileName, Len(getFileName) - 1)
Else
getFileName = ""
End If
End With