'** 使用FileDialog对象来选择文件夹
Dim fd As FileDialog
Dim strPath As String
Set fd = Application.FileDialog(msoFileDialogFolderPicker) ' 显示选择文件夹对话框
fd.InitialFileName = ThisWorkbook.Path & "\" '设置默认路径
If fd.Show = -1 Then '** 用户选择了文件夹
strPath = fd.SelectedItems(1)
Else
strPath = "": Exit Sub
End If
Set fd = Nothing
'************
Set wb = Workbooks.Open(strPath & "\" & "数据表.xls") '读入
'** 使用FileDialog对象来选择文件夹
Dim fd As FileDialog
Dim strPath As String
Set fd = Application.FileDialog(msoFileDialogFolderPicker) ' 显示选择文件夹对话框
fd.InitialFileName = ThisWorkbook.Path & "\" '设置默认路径
If fd.Show = -1 Then '** 用户选择了文件夹
strPath = fd.SelectedItems(1)
Else
strPath = "": Exit Sub
End If
Set fd = Nothing
'************
Set wb = Workbooks.Open(strPath & "\" & "数据表.xls") '读入