Dear All,
Please help me how to resolve this error problem,
When folder is creat or already creat , I want a notification created or already creat in column B
Sub Folder()
Dim sv, i As Long
sv = Cells(1).CurrentRegion
For i = 1 To UBound(sv)
If Dir(sv(i, 1) & "\" & sv(1, 2), 16) = "" Then
CreateObject("shell.application").Namespace("c:").NewFolder Split(sv(i, 1), "\", 2)(1) & "\" & sv(1, 2)
Else
Application.DisplayAlerts = True
End If
Next i
End Sub
De folder need to be created :
C:\data\Name1\02-2021
C:\data\Name2\02-2021
C:\data\Name3\02-2021
C:\data\Name4\02-2021
C:\data\Name5\02-2021
Bookmarks