Set dlg = Application.FileDialog(1) With dlg .AllowMultiSelect = False .Show End With If dlg.SelectedItems.Count > 0 Then GetFolder = dlg.SelectedItems(1) Else GetFolder = "" End If Set dlg = Nothing-----------access +vba 网上查到的用于打开选择文件的窗口的代码,不知道引用什么dll
With dlg
.AllowMultiSelect = False
.Show
End With
If dlg.SelectedItems.Count > 0 Then
GetFolder = dlg.SelectedItems(1)
Else
GetFolder = ""
End If
Set dlg = Nothing-----------access +vba 网上查到的用于打开选择文件的窗口的代码,不知道引用什么dll
“另存为”对话框:让用户选择一个可以使用 Execute 方法保存当前文件的文件。
“文件选取器”对话框:让用户选择一个或多个文件。用户选择的文件路径将捕获到 FileDialogSelectedItems 集合。
“文件夹选取器”对话框:让用户选择一个路径。用户选择的文件路径将捕获到 FileDialogSelectedItems 集合。用法:
Set fd = Application.FileDialog(MsoFileDialogType)MsoFileDialogType的取值:
msoFileDialogOpen = 1
msoFileDialogSaveAs = 2
msoFileDialogFilePicker = 3
msoFileDialogFolderPicker = 4
microsoft access 11.0 object libraryoffice版本不同11.0适当变化