//*********Function for creation of folder at local computer***************//
Function CheckMakeFolder ( root As String , leaf As String, subleaf As String) As String
Dim strPath As String
Dim strPath1 As String
strPath = root & "\" & leaf
'MsgBox (strpath)
If Not DirExists (strPath) Then
MkDir strPath
End If
strPath1 = strPath & "\" & subleaf
If Not DirExists (strPath1) Then
MkDir strPath1
End If
'End If
CheckMakeFolder = strPath1
End Function
Function DirExists (strPath As String) As Boolean
DirExists = (Dir$ (strPath ,16 ) <> "" )
'MsgBox(DirExists)
End Function
Function CheckMakeFolder ( root As String , leaf As String, subleaf As String) As String
Dim strPath As String
Dim strPath1 As String
strPath = root & "\" & leaf
'MsgBox (strpath)
If Not DirExists (strPath) Then
MkDir strPath
End If
strPath1 = strPath & "\" & subleaf
If Not DirExists (strPath1) Then
MkDir strPath1
End If
'End If
CheckMakeFolder = strPath1
End Function
//******Function for validating the Directories from Local computer****************//
DirExists = (Dir$ (strPath ,16 ) <> "" )
'MsgBox(DirExists)
End Function
Thanks so much! Was exactly the function I needed!
ReplyDeleteAlways Welcome my dear friend :)
DeleteGood job
ReplyDelete