Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Returning FileLen with very large file
FileLen returns a Long integer but I have a file which is over 7GB in size,
which is beyond the limit of a long integer so I get an overflow error. I need to extract the file length to calculate details of the contents of the file. How can I do this? Grateful for assistance. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Returning FileLen with very large file
Option Explicit
Sub testme() Dim myFileName As String Dim FSO As Object Set FSO = CreateObject("Scripting.FileSystemObject") myFileName = "C:\My Documents\giganticfilename.here") MsgBox Format(FSO.GetFile(myFileName).Size, "#,##0") End Sub simonc wrote: FileLen returns a Long integer but I have a file which is over 7GB in size, which is beyond the limit of a long integer so I get an overflow error. I need to extract the file length to calculate details of the contents of the file. How can I do this? Grateful for assistance. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Saving Excel 2007 file in 2003 creates very large file | Excel Discussion (Misc queries) | |||
INDEX/MATCH/LARGE returning #VALUE! error | Excel Worksheet Functions | |||
Large Function returning top values | Excel Worksheet Functions | |||
FileLen with very large files | Excel Programming | |||
Returning a value if data is in a large list | Excel Discussion (Misc queries) |