Attribute VB_Name = "IISLogsSizeReport"
Option Explicit

Public Sub IISLogsSizeReport()
    Dim fso As Object
    Dim folder As Object
    Dim folderPath As String

    folderPath = "C:\inetpub\logs\LogFiles"

    Set fso = CreateObject("Scripting.FileSystemObject")

    If Not fso.FolderExists(folderPath) Then
        MsgBox "Folder not found:" & vbCrLf & folderPath, vbExclamation
        Exit Sub
    End If

    Set folder = fso.GetFolder(folderPath)

    MsgBox "IIS log files" & vbCrLf & folderPath & vbCrLf & _
           "Size: " & Format(folder.Size / 1048576, "#,##0.00") & " MB" & vbCrLf & _
           "Files (top level): " & folder.Files.Count, vbInformation
End Sub