How to read all text files one by one in a specified folder

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • atiullah
    New Member
    • May 2010
    • 9

    #1

    How to read all text files one by one in a specified folder

    How to read all text files one by one in a specified folder using msexcel vb editor
  • vb5prgrmr
    Recognized Expert Contributor
    • Oct 2009
    • 305

    #2
    In the help files, look up the following...

    FreeFile Function
    Open Statement
    Line Input Function
    Input Function
    Close Statement

    You can also look these up on the web (vb6 freefile function, vb6 open statement,...) and at M$. However, at M$ you will need to filter through all of the .net cra...stuff.

    Also, help files should have examples for you to look at along with the various web sources...



    Good Luck

    Comment

    • 9815402440
      New Member
      • Oct 2007
      • 180

      #3
      use following loop to get each text file
      f=dir("*.txt")
      do while f <> empty
      'process files
      f = dir()
      loop

      regards
      Manpreet Singh Dhillon Hoshiarpur

      Comment

      • atiullah
        New Member
        • May 2010
        • 9

        #4
        @Manpreet...tnx a lot man...i had been pondering over it for 2 days..u r a lifesaver :)

        Comment

        Working...