QuantBurner
New Member
- Joined
- Jan 29, 2011
- Messages
- 42
Hi,
I need some VBA code to return True/False if a string is a valid folder.
Thanks!
I need some VBA code to return True/False if a string is a valid folder.
Thanks!
Function IsFolder(r As String) As Boolean
If Dir(r, vbDirectory) <> "" Then IsFolder = (GetAttr(r) = 16)
End Function
Function IsFolder(r As String) As Boolean
If Dir(r, vbDirectory) <> "" Then IsFolder = (GetAttr(r) And vbDirectory)
End Function