您的位置:首页 > 其它

用自定义函数判断指定文件夹下是否包含子文件夹

2010-02-03 21:54 288 查看
Function CheckFolder(sPath As String) As Boolean
If Right(sPath, 1) <> "/" Then sPath = sPath & "/"
Dim sDir As String
sDir = Dir(sPath & "*.*", vbDirectory)
While sDir <> ""
If GetAttr(sPath & sDir) And vbDirectory Then
CheckFolder = True
sDir = ""
Else
sDir = Dir()
End If
Wend
End Function
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐