I found this macro and it almost does what I need, except for the msg box. Can anyone help me edit the code so it paste the count result to a cell in my open workbook instead of the message box. Feels like there is something really easy that I'm missing to accomplish this.
Code:
Sub FolderColl()
Dim oFSO As Object
Dim folder As Object
Dim subfolders As Object
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set folder = oFSO.GetFolder("J:\folderpath....")
Set subfolders = folder.subfolders
Sheet1.Range("B2").Value = subfolder.Count
MsgBox subfolders.Count
Set oFSO = Nothing
Set folder = Nothing
Set subfolders = Nothing
'release memory
End Sub