Results 1 to 14 of 14

Import text file

Threaded View

  1. #5
    Registered User
    Join Date
    09-27-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: VBA code to Import text file

    Quote Originally Posted by bigmack View Post
    Hi,

    you can use the Open statement:
    Open "your directory path\file name.txt" for input as #1
    then read through each line within a loop until EOF. What part(s) of the text file are you specifically looking for?
    I need information as follows and data to be entered as 1 row

    Header
    Item Number, Description, last shipment, last receipt, Average Unit Cost, Stocking Unit, Qty on Hand, additional Information.

    Data
    47, lamp, dd/mmm/yy, dd/mmm/yy, ###,000.00, EA, 50.00, K5501

    I'm self-taught myself in vba, I understand loop code if i work on spreadsheet. however for this I cannot figure out how to capture data in a text file.

    any ideas or example with some explanation will be helpful for me.
    Last edited by norhaya; 09-28-2009 at 04:12 AM. Reason: Wrong Header

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