Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying Excel File size

Status
Not open for further replies.

juschuma

Programmer
Oct 23, 2002
18
0
0
US
Anyone know a way to retrieve (in a macro) the size of the workbook currently open?
 
Try this:

Sub test()

Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile(Application.ActiveWorkbook.Name)
d = f.DateCreated
s = f.Size
MsgBox s
Set f = Nothing
Set fs = Nothing

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top