try:
Code:
Function FileSize(strFile As String)
'******************************************************************************
' *
'Author: Adam Evanovich *
'Date: 7/7/2006 *
'Purpose: Returns the size of the specified file. *
' *
'Arguments: *
'strFile > Path of the File being evaluated. *
' *
'******************************************************************************
On Error GoTo Err_Handle
If GetAttr(strFile) <> 32 Then
MsgBox "File not found..."
GoTo Exit_Handle
End If
FileSize = CDbl(FileLen(strFile))
FileSize = IIf(FileSize < (CDbl(1024)), _
CStr(Format(FileSize, "#,###")) & "B", _
IIf(FileSize < (CDbl(1024) * CDbl(1024)), _
CStr(Format(FileSize / CDbl(1024), "#,###.00")) & "KB", _
IIf(FileSize < (CDbl(1024) * CDbl(1024) * CDbl(1024)), _
CStr(Format(FileSize / CDbl(1024) / CDbl(1024), "#,###.00")) & "MB", _
CStr(Format(FileSize / CDbl(1024) / CDbl(1024) / CDbl(1024), "###,###.00")) & "GB" _
)))
Exit_Handle:
Exit Function
Err_Handle:
MsgBox (Err.Description)
Resume Exit_Handle
End Function '//LL
the size of your opened db will not be accurate though. I believe each users that has it opened will bloat it just a little bit in size. sorry, didn't see the edit!