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.
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
"Marvin" <Marvin@discussions.microsoft.com> wrote in message
news:5721669F-56FB-4E8A-8666-FC2F5E01DEA7@microsoft.com...
>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.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks