Skip to content

Instantly share code, notes, and snippets.

@hedgejanuary
Created May 3, 2020 12:44
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save hedgejanuary/e07e50511d9eb4863bf3b9bd8c099eda to your computer and use it in GitHub Desktop.
This code makes several directories in one shot.
Dim rng As Range
Dim newDirPath As String
For Each rng In Range("A1").ListObject.ListColumns(1).DataBodyRange
newDirPath = ThisWorkbook.Path & "\" & rng.Value
If Dir(newDirPath, vbDirectory) = "" Then
MkDir newDirPath
End If
Next rng
MsgBox "Folders has been created."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment