Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default 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" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading contents Fiona Excel Discussion (Misc queries) 3 June 28th 07 02:56 AM
Directory contents Eric[_6_] Excel Programming 1 August 27th 04 05:56 PM
reading contents of a file Christopher Brooks[_3_] Excel Programming 2 June 14th 04 09:06 PM
Directory Contents Jo[_6_] Excel Programming 3 April 21st 04 03:19 AM
Browsing to URL and reading contents Mike[_49_] Excel Programming 9 November 20th 03 07:53 PM


All times are GMT +1. The time now is 08:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"