2
Contributors
3
Replies
6
Views
6 Years
Discussion Span
Last Post by Jx_Man
3

There are many way to accomplish this.
See if this help :

' Get a free file number
nFileNum = FreeFile

' Open a text file for input. inputbox returns the path to read the file
Open "D:\test.txt" For Input As nFileNum
lLineCount = 1
' Read the contents of the file
Do While Not EOF(nFileNum)
   Line Input #nFileNum, sNextLine
   'do something with it
   'add line numbers to it, in this case!
   sNextLine = sNextLine & vbCrLf
   sText = sText & sNextLine

Loop
Text1.Text = sText
' Close the file
Close nFileNum
Votes + Comments
This a good stuf :)
Really Quick Solution.. thx jx
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.