LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default Excel DIR

Hi All
I am using the DIR function in VBA (Excel 2002) to build a list of files in
a specified directory as follows, and it work fine. My problem is that I
need a similar code for Excel 97. It appears the the construct for the DIR
function does not accept the pathname and or attributes parameters in the
smae way. Can anyone help to describe the differences between them.

Directory = "C:\myfiles\"
xFile = Dir(Directory & "*.xls", 7)
Do While xFile < ""
wpList.Cells(xRow, 1) = xFile
xRow = xRow + 1
xFile = Dir
Loop

--
Cheers
Nigel




 
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



All times are GMT +1. The time now is 02:18 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"