File Length

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have identified a file that I want to process using
whatfile = Application.GetOpenFilename
I would like to get the length and attributes of the file. Help please.

Thanks.
 
Marvin,

Try some code like the following:
Dim FName As Variant
FName = Application.GetOpenFilename("Excel Files,*.xls")
If FName = False Then
Exit Sub
End If
Debug.Print "File Size:", FileLen(FName)
Debug.Print "Attributes:", GetAttr(FName)

See help for GetAttr for the meaning of the return value of
GetAttr.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top