I am a total newbie in VBA so I hope you could help me with this. I want to create a folder inside a given path. Inside the folder, I want a subfolder. The name of the folder will be indicated in column A and of the subfolder in column B of an excel worksheet. The path will be in column C.
I would like to be able to click on a cell on column D which would activate a macro who will then create the folder and subfolder. I was hoping to be able to achieve this by using this code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Application.Intersect(Target, Range("c2:c10000")) Is Nothing Then Call CreatePath
End Sub
So I need the function CreatePath. When a cell is selected on Column D, the CreatePath function should identify the row of the selected cell from column D, take from that row the corresponding name of the folder, subfolder and the path and create the folder and subfolder. Any idea how this function should look like? Please keep in mind that I have started to "play" two days ago with VBA so my know-how is very limited. Thank you all for your support.