To read a textfile in VBA you can use the following snippet.
to read a textfile line by line see How to read a textfile line by line in VBA.
Sample VBA
Function ReadTextfileComplete(ByVal strFile As String) As String
Dim hFile As Long
hFile = FreeFile
Open strFile For Input As #hFile
ReadTextfileComplete = Input$(LOF(hFile), hFile)
Close #hFile
End Function
RT @CodeSnippetsNET: How to read a textfile in #VBA http://t.co/d6yv00SaD5 #msaccess #programming #code #coding #dev #excel