Property: Size for File
- Updated2024-09-12
- 1 minute(s) read
FileSystemObject and Dictionary > Properties > Property: Size for File
Property: Size for File
Specifies the size of a file.
Object.Size
| Object | File Object with this property |
| Object.Size | Variant with read access Returns the size in bytes. |
The following example returns the size of a file:
Function ShowFileSize(sFile) Dim fso, oMyFile Set fso = CreateObject("Scripting.FileSystemObject") Set oMyFile = fso.GetFile(sFile) ShowFileSize = "Size: " & oMyFile.Size End Function