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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help! How do i access the file size attribute of a file 1

Status
Not open for further replies.

schwankieog

Programmer
Jul 25, 2001
43
US
i need to access the size of an access database via code in my vb program. i realizr i could loop through all the table as add up their sizes and it would give me a good estimate (of course it leaves out a the forms, queries, etc) i would really like to able to assign it to a int or a long, or whatever number variable is necessary. if any one knows how ican do this, i would appreciate the help.
 
Make reference to Microsoft Scripting runtime


Private Sub Form_Load()
Dim ofile As Scripting.File
Dim sfile As String
sfile = "C:\programing\David\Database\Accounting.mdb"
Set fso = New FileSystemObject
Set ofile = fso.GetFile(sfile)
MsgBox ofile.Size
End Sub


David Paulson

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top