+ Reply to Thread
Results 1 to 2 of 2

File Length

Hybrid View

  1. #1
    Marvin
    Guest

    File Length

    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.

  2. #2
    Chip Pearson
    Guest

    Re: File Length

    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.




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1