zabiullakhan
Active Member
- Joined
- Aug 30, 2010
- Messages
- 310
how can i create a folder at a location if the folder dosent exist?
myDir = ActiveWorkbook.FullName
If Not DirExists(myDir & "\ALL Cuts Consolidated\") Then
MkDir myDir & "ALL Cuts Consolidated\"
End If
Function DirExists(sSDirectory As String) As Boolean
If Dir(sSDirectory, vbDirectory) <> "" Then DirExists = True
End Function
Sub test()
Dim myDir As String
myDir = ActiveWorkbook.Path
If Not DirExists(myDir & "\ALL Cuts Consolidated") Then
MkDir myDir & "\ALL Cuts Consolidated"
End If
End Sub