VB打开同目录下名为AA的文件夹?(刚才没说清楚)

来源:百度知道 编辑:UC知道 时间:2024/07/02 05:32:25
:首先判断同目录下AA是否存在,如果存在就打开它,AA是文件夹

dim Path as string
path=app.path & IIf(len(app.path)=3,"AA","\AA")
if dir(path,vbDirectory)<>"" then Shell "Explorer.exe" & Chr(34) & path & Chr(34)

要用一个驱动控件

dim fso as new filesystemobject
if fso.folderexist(app.path &"\AA")= true then
Shell "Explorer.exe" & app.path &"\AA"
end if