'在文件对话框对中返回选择一个文件夹的路径. Public Function ChooseFolder() As String Dim dlgOpen As FileDialog Set dlgOpen = Application.FileDialog(msoFileDialogFolderPicker) With dlgOpen If .Show = -1 Then ChooseFolder = .SelectedItems(1)End IfEnd With Set dlgOpen = Nothing End Function '-------------------------------------------------------- '在文件对话框对中,选择一个文件。