VB怎么判断一个目录存在
来源:百度知道 编辑:UC知道 时间:2024/06/19 04:17:08
如 d:\文件夹1 发现D盘文件夹1 !如有就显视有 没有就显视否。
newdir = Dir("d:\文件夹1", vbDirectory)
If newdir = "" Then
MsgBox "目录不存在"
Else
MsgBox "该目录存在"
End If
if dir (app.path & "/test/") <> "0" then
msgbox"yes"
else
msgbox"no"
end if