Results 1 to 6 of 6

analyzing text file line by line

Threaded View

HarryKlein analyzing text file line by... 05-16-2011, 09:59 AM
snb Re: analyzing text file line... 05-16-2011, 10:14 AM
HarryKlein Re: analyzing text file line... 05-16-2011, 10:44 AM
snb Re: analyzing text file line... 05-16-2011, 11:29 AM
HarryKlein Re: analyzing text file line... 05-16-2011, 12:12 PM
snb Re: analyzing text file line... 05-16-2011, 12:20 PM
  1. #1
    Forum Contributor
    Join Date
    05-10-2011
    Location
    Budapest, Hungary
    MS-Off Ver
    Excel 2016
    Posts
    187

    analyzing text file line by line

    Hello,

    I have a txt file, of which I want to get back its lines line by line, and I also need to know, how many lines does it have.

    I have this code:

    Dim fName as Strinmg
    Dim obj
    Dim SingleLine
    Set obj = CreateObject("Scripting.FileSystemObject")
    fName= "c:\data\file.txt"
    SingleLine = obj.OpenTextFile(filename, ForReading).Read(100)
    Set obj = Nothing

    But of course it is not exactly the one I need, I guess, I need to create a while statement, but I cannot find out, how.

    Could anybody help me? All advices would be appreaciated
    Last edited by HarryKlein; 05-16-2011 at 12:32 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1