Link to home
Start Free TrialLog in
Avatar of HKFuey
HKFueyFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Access VBA loop through filenames

From here: - http://www.dbforums.com/microsoft-access/1647035-loading-all-file-names-static-directory-ms-access-table.html
I modified to this: -
Dim strFileName As String
FileName = Dir("c:/EPOD/*.XML")
Do While FileName <> ""
    Debug.Print strFileName
    strFileName = Dir()
Loop
This prints out all the xml files in a folder but then errors "Run time error 5 Invalid Procedure Call or Argument"

Basically, I'm trying to process all the xml files in a given folder, can anyone help?
ASKER CERTIFIED SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of HKFuey

ASKER

Thanks very much, glad it was easy!