Hello All, I am looking for some help creating sub folders in a VBA Macro. I have code the allows me to browse where to create a folder using the cell value as the name. What I would like to do is create another sub folder under the previously selected folder, named from a new cell value.
'Sub Create_Folders()
penAt = "My computer:"
Set ShellApp = CreateObject("Shell.Application").BrowseForFolder(0, "Please Choose The Folder For This Project", 0, OpenAt)
'Set the folder to that selected. (On error in case cancelled)
On Error Resume Next
BrowseForFolder = ShellApp.Self.Path
'new folder location
Dim Rng As Range
Set Rng = Sheet1.Cells(100, 8).Value
'create folder in selected directory
If Sheet1.Cells(100, 8).Value <> "" Then
MkDir (BrowseForFolder & "" & Sheet1.Cells(100, 8).Value)
'Sub Create_Folders()
penAt = "My computer:"
Set ShellApp = CreateObject("Shell.Application").BrowseForFolder(0, "Please Choose The Folder For This Project", 0, OpenAt)
'Set the folder to that selected. (On error in case cancelled)
On Error Resume Next
BrowseForFolder = ShellApp.Self.Path
'new folder location
Dim Rng As Range
Set Rng = Sheet1.Cells(100, 8).Value
'create folder in selected directory
If Sheet1.Cells(100, 8).Value <> "" Then
MkDir (BrowseForFolder & "" & Sheet1.Cells(100, 8).Value)