Access交流网
电 话:0760-88315075
热 线:0760-88315075
邮 编:528463
咨询QQ:1918333016
营销QQ:4008553990
Email:1918333016@qq.com
FileDialog 可以根据后面的参数,打开通用对话框
Dim strPath As String
Dim MyFileDialog As FileDialog
Set MyFileDialog = Application.FileDialog(msoFileDialogFolderPicker)
If MyFileDialog.Show = -1 Then
'使用循环显示选取文件的路径和名称
For Each vrtSelectedItem In MyFileDialog.SelectedItems
strPath = vrtSelectedItem
Next
End If
MsgBox strPath
这段代码,可以打开一个对话框,选择文件夹,获得选择的文件夹的路径