May 15, 2002 #1 BaDi Programmer Joined May 14, 2002 Messages 32 Location NL Hi! How can I put the filesize of a file in a variable? Thanx in advance!
May 15, 2002 #2 CCLINT Programmer Joined Feb 22, 2002 Messages 3,802 Location DE Use FSO (File System Object - reference to Microsoft Scripting), to get the file size, and set the return value to a variable. Dim oFso As New Scripting.FileSystemObject Dim f As Scripting.File Set f = oFso.GetFile("C:\myFile" Debug.Print f.Size Upvote 0 Downvote
Use FSO (File System Object - reference to Microsoft Scripting), to get the file size, and set the return value to a variable. Dim oFso As New Scripting.FileSystemObject Dim f As Scripting.File Set f = oFso.GetFile("C:\myFile" Debug.Print f.Size