0
I'm attempting to create a 5 level folder having an Excel sheet as the source.
NOTE: Excel sheet is column organized by levels on each column as shown.
Reference VB script from:
Creating folders and sub-folders with a VBA macro
ERR: **'Shell ("cmd /c md " & Chr(34) & strFolders & Chr(34))**
Script:
Sub CreateFolderStructure()
Dim objRow As Range, objCell As Range, strFolders As String
For Each objRow In ActiveSheet.UsedRange.Rows
strFolders = "C:\Users\morar\Downloads\FoldersNSubsr"
For Each objCell In objRow.Cells
strFolders = strFolders & "\" & objCell
Next
**Shell ("cmd /c md " & Chr(34) & strFolders & Chr(34))**
Next
End Sub
I'm attempting to create a 5 level folder having an Excel sheet as the source.
NOTE: Excel sheet is column organized by levels on each column as shown.
Reference VB script from:
Creating folders and sub-folders with a VBA macro
ERR: **'Shell ("cmd /c md " & Chr(34) & strFolders & Chr(34))**
Script:
Sub CreateFolderStructure()
Dim objRow As Range, objCell As Range, strFolders As String
For Each objRow In ActiveSheet.UsedRange.Rows
strFolders = "C:\Users\morar\Downloads\FoldersNSubsr"
For Each objCell In objRow.Cells
strFolders = strFolders & "\" & objCell
Next
**Shell ("cmd /c md " & Chr(34) & strFolders & Chr(34))**
Next
End Sub