List all Level SubDirectories using VBA The following code lists all the directories under c:\Temp Function GetSubDir(ByVal sDir) Dim oFS As New FileSystemObject Dim oDir Set oDir = oFS.GetFolder(sDir) For Each oSub In oDir.SubFolders MsgBox oSub.Path GetSubDir oSub.Path Next oSub End Function You can call the function like shown below GetSubDir "C:\Temp\" The code uses FileSystemObject from Microsoft Scripting RunTime. You need to add reference to this library (see figure below) See also VBA Dir Function to Get Sub Directories
Awaz Apni Baat Apni is started in new Vision of Pakistan, We want to see a real image of Pakistan in public Point of View, Our Pakistan with New Vision.

