+ Reply to Thread
Results 1 to 3 of 3

Reading Contents of a Directory

  1. #1
    Nigel
    Guest

    Reading Contents of a Directory

    Hi All
    I need to fill a set of combo boxes with a list of files from separate
    directories. No problem with filling a combo box but what is the best
    method of reading a directory contents. I will be looking for .xls file
    types with a text mask for the filename. e.g. all files beginning "ARTS_"
    and ending ".XLS"

    TIA

    --
    Cheers
    Nigel





  2. #2
    K Dales
    Guest

    RE: Reading Contents of a Directory

    Look in VBA help at the Dir function
    --
    - K Dales


    "Nigel" wrote:

    > Hi All
    > I need to fill a set of combo boxes with a list of files from separate
    > directories. No problem with filling a combo box but what is the best
    > method of reading a directory contents. I will be looking for .xls file
    > types with a text mask for the filename. e.g. all files beginning "ARTS_"
    > and ending ".XLS"
    >
    > TIA
    >
    > --
    > Cheers
    > Nigel
    >
    >
    >
    >
    >


  3. #3
    Nigel
    Guest

    Re: Reading Contents of a Directory

    Thanks, I found a solution ......

    FDir = "C:\directory\"
    Fname = Dir(FDir, 7)
    Do While Fname <> ""
    ' code to fill combo here
    Fname = Dir
    Loop


    --
    Cheers
    Nigel



    "K Dales" <[email protected]> wrote in message
    news:[email protected]...
    > Look in VBA help at the Dir function
    > --
    > - K Dales
    >
    >
    > "Nigel" wrote:
    >
    > > Hi All
    > > I need to fill a set of combo boxes with a list of files from separate
    > > directories. No problem with filling a combo box but what is the best
    > > method of reading a directory contents. I will be looking for .xls file
    > > types with a text mask for the filename. e.g. all files beginning

    "ARTS_"
    > > and ending ".XLS"
    > >
    > > TIA
    > >
    > > --
    > > Cheers
    > > Nigel
    > >
    > >
    > >
    > >
    > >




+ 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