Sub FileSize()
Dim oFSO
Dim oFile
Dim oSourceFile
oSourceFile = "D:/Excel/test.xls"
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oFile = oFSO.GetFile(oSourceFile)
If oFile.Size 5000000 Then
Application.Calculation = xlManual
End If
Set oFile = Nothing
Set oFSO = Nothing
End Sub
--
raypayette
------------------------------------------------------------------------
raypayette's Profile:
http://www.excelforum.com/member.php...o&userid=29569
View this thread:
http://www.excelforum.com/showthread...hreadid=566359