View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
goshute goshute is offline
external usenet poster
 
Posts: 19
Default looping through text files in a folder

The untested code below should read through all text files in the
specified directory

Dim strFile As String
'Get first file
strFile = Dir("C:\MyFolder\*.txt")

'Begin Processing
Do While Not Trim(strFile) = ""
'Insert file proccessing here . . . . . .
'Get Next File
strFile = Dir()
Loop


Goshute