Hello,
I have the attached file and code used to create folders and subfolders on the fly. It usually performs the task rather quickly however I have a lot of folders and subs to create now and the file is taking a long time to complete. Any recommendations on altering the code below to make it run faster?
Sub CreateFolderStructure()
Dim objRow As Range, objCell As Range, strFolders As String
For Each objRow In ActiveSheet.UsedRange.Rows
strFolders = "C:\Users\Anthony.Martin\Documents\0-Test"
For Each objCell In objRow.Cells
strFolders = strFolders & "\" & objCell
Next
Shell ("cmd /c md " & Chr(34) & strFolders & Chr(34))
Next
End Sub
Bookmarks