DiGiTAL
Fri Mar 17 14:44:24 CST 2006
Instead of reading the file one line at a time, etc. Try this way:
Option Explicit
Dim oFSO, oFilterFile, aFilterArray, iElement
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oFilterFile = oFSO.OpenTextFile("c:\filter.txt",1)
aFilterArray = split(oFilterFile.ReadAll,VbCrLf)
oFilterFile.Close
For iElement = 0 To UBound(aFilterArray)
msgbox "Element#" & iElement & ":" & aFilterArray(iElement)
Next
---
Life is all about ass; you're either covering it, laughing it off,
kicking it, kissing it, busting it, trying to get a piece of it,
behaving like one, or living with one!
*** Sent via Developersdex
http://www.developersdex.com ***