Wednesday, March 25, 2009

Create Subfolder

This function first checks to see if a subfolder exists, and creates one if it does not exist. The function returns the path. It is dependent on the DirExists function.
Function CheckMakeFolder ( root As String , leaf As String) As String
Dim strPath As String
strPath = root & "\" & leaf
If Not DirExists (strPath) Then
Mkdir strPath
End If
CheckMakeFolder = strPath
End Function

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.