代码如下:
'引用Microsoft Shell Controls And Automation
Dim ShellA As New Shell
Private Sub Command1_Click() '建立一个按钮对象
Dim Shellb As Folder
Set Shellb = ShellA.BrowseForFolder(0, "选择文件夹", 0)
ShellA.Open Shellb '打开所选文件夹
Text1 = Shellb.Items.Item.Path '取得所选文件夹路径
File1.Path = Text1
End Sub
评论