May 15, 2002 #1 BaDi Programmer May 14, 2002 32 NL Hi! How can I put the filesize of a file in a variable? Thanx in advance!
May 15, 2002 #2 CCLINT Programmer Feb 22, 2002 3,802 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