![]() |
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 |
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 |
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 |
All times are GMT +1. The time now is 11:58 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com