Need to edge out the competition for your dream job? Train for certifications today.
Dim fso As Object
Open in new window
Dim fso As FileSystemObject, fdrSelected, fdrSub, filTemp
Dim strFilePath As String, rngOutput As Range
' change folder as required
strFilePath = "Q:\Deburr issue\WT Review\Ship 0008"
' change list destination as required
Set rngOutput = ActiveSheet.Range("A1")
Set fso = CreateObject("Scripting.FileSystemObject")
Set fdrSelected = fso.GetFolder(strFilePath)
For Each fdrSub In fdrSelected.SubFolders
rngOutput.value = fdrSub.Path
Set rngOutput = rngOutput.Offset(1)
Set fso = Nothing
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.