我对VBA不太了解,我想要的是用一个按钮点击查看我的电脑然后我选择相应的文件夹。我之前看到别人用的这个很好用,不过我改了试了一下不太发现完成不了。这个别人的代码, Dim shell As Variant
Set shell = CreateObject("Shell.Application")
Set filePath = shell.BrowseForFolder(&O0, "选择文件夹", &H1 + &H10, "\\Zyd_sx\2014年销售合同") '获取文件夹路径地址
Set shell = Nothing
If filePath Is Nothing Then '检测是否获得有效路径,如取消直接跳出程序
Exit Sub