I am trying to create a Macro in VBA editor. What I want it to do is create a directory from the text in one cell be selected.
The code below works to create the directory from a selected cell but will not create sub-directory called "High".
I also think I need some error handling included... I am not very good at VBA.
Sub MakeDirs()
For Each cell In Selection
MkDir "C:\Users\Owner\Documents\Mainfolder" & cell.Value
MkDir "C:\Users\Owner\Documents\Mainfolder" & cell.value & "\High"
Next cell
End Sub
Any help is greatly appreciated.
Thanks
Ozz
The code below works to create the directory from a selected cell but will not create sub-directory called "High".
I also think I need some error handling included... I am not very good at VBA.
Sub MakeDirs()
For Each cell In Selection
MkDir "C:\Users\Owner\Documents\Mainfolder" & cell.Value
MkDir "C:\Users\Owner\Documents\Mainfolder" & cell.value & "\High"
Next cell
End Sub
Any help is greatly appreciated.
Thanks
Ozz