This code works great for a target folder count. But some of my target folders now have hundreds of sub folders. How do I make it search a folder and subfolders and return a total file count? Need it to search all file types.
Sub sample() Dim FolderPath As String, path As String, count As Integer FolderPath = "C:\Share\2015\My_Project\HwySign" path = FolderPath & "\*" Filename = Dir(path) Do While Filename <> "" count = count + 1 Filename = Dir() Loop Range("Q8").Value = count 'MsgBox count & " : files found in folder" End Sub