You could try some error handling. Change the ListFolderDetails routine for this:

Sub ListFolderDetails(ByVal Folder As Object, ByVal TargetSheet As Worksheet, Optional ByVal Level As Long = 1)
'If using Early Binding, use "ByVal Folder As Scripting.Folder" instead of "ByVal Folder As Object"

    '''''''''''''''''''''''''''''''''''''''''''''''''''''
    'Early Binding - reference set
    '''''''''''''''''''''''''''''''''''''''''''''''''''''
'    Dim SubFolder As Scripting.Folder
    '''''''''''''''''''''''''''''''''''''''''''''''''''''
    
    '''''''''''''''''''''''''''''''''''''''''''''''''''''
    'Late Binding - no reference set
    '''''''''''''''''''''''''''''''''''''''''''''''''''''
    Dim SubFolder As Object
    '''''''''''''''''''''''''''''''''''''''''''''''''''''
    
        Dim SheetRow As Long
    
    If (UBound(Split(Folder.Path, "\")) - FolderCount) > MAXSUBFOLDERS Then Exit Sub
    
    SheetRow = TargetSheet.Cells.Find(What:="*", After:=TargetSheet.Cells(1, 1), LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row + 1
    
    On Error GoTo Continue
    TargetSheet.Cells(SheetRow, 1).Value = Folder.Name
    TargetSheet.Cells(SheetRow, 2).Value = Folder.Path
    TargetSheet.Cells(SheetRow, 5).Value = Level
    TargetSheet.Cells(SheetRow, 3).Value = Format(Folder.DateCreated, "yyyy") & " - " & Format(Folder.DateLastModified, "yyyy")
    TargetSheet.Cells(SheetRow, 4).Value = Format(Folder.Size / 1024 / 1024, "#,##0.0 \MB")

Continue:
    On Error GoTo 0
    For Each SubFolder In Folder.SubFolders
        Call ListFolderDetails(SubFolder, TargetSheet, UBound(Split(Folder.Path, "\")) - FolderCount + 2)
    Next SubFolder
    
End Sub
I'm not able to test this code at the moment.