This will give the total size of all files in any directory supplied to the function:
Private Function FileSize(ByVal FolderPath As String) As Long
Dim fso, fldr, fc, f
Set fso = CreateObject("Scripting.FileSystemObject"
Set fldr = fso.GetFolder(FolderPath & "\"
Set fc = fldr.Files
For Each f In fc
FileSize = FileSize + f.Size
Next
FileSize = FileSize / 1024
End Function
For a FileListBox named "File1", just call the function like this:
x = FileSize(File1.Path)
also, there were a couple of errors in the first function. Use this:
Private Function DriveFreeSpace(DrivePath) As Long
Dim fso, drv
Set fso = CreateObject("Scripting.FileSystemObject"

Set drv = fso.GetDrive(fso.GetDriveName(DrivePath))
DriveFreeSpace = drv.FreeSpace / 1024
End Function
I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson