+ Reply to Thread
Results 1 to 2 of 2

VB Code to 'read' .txt files and display info in Excel

  1. #1
    Registered User
    Join Date
    06-14-2004
    Posts
    75

    Question VB Code to 'read' .txt files and display info in Excel

    Hi all

    I am not sure that what I want is possible with simple VBA code but here it goes anyway!

    I have loads of files that are being automatically created via a VB program. Each file is inividually taged and contains data about promotional activities.

    I would like to be able to have a code in Excel that:
    • Reads the .txt files in the given location
    • Finds the reference to the proper brand as selected in a drop down menu on my spreadsheet
    • Display the relevant information, formated if possible!
    • That's it! :D

    If you have any tips, let me know!

    I have a bad feeling that I'd need to be a fully trained programmer to implement that...

  2. #2
    Tom Ogilvy
    Guest

    Re: VB Code to 'read' .txt files and display info in Excel

    Look at Data=>Get External data and treat your text file as a database
    (hopefully it is set up that way).

    You can set up a parameter query as shown here:


    http://nickhodge.co.uk/gui/datamenu/...taexamples.htm

    or here

    http://www.*****-clicks.com/excel/Ex...htm#Parameters

    If you want to program low level file io:

    http://www.cpearson.com/excel/imptext.htm import/export text files

    as an example and for reference:

    http://support.microsoft.com/default...b;en-us;151262
    Working with Sequential Access Files

    http://www.applecore99.com/gen/gen029.asp

    --
    Regards,
    Tom Ogilvy



    "Petitboeuf" <[email protected]> wrote
    in message news:[email protected]...
    >
    > Hi all
    >
    > I am not sure that what I want is possible with simple VBA code but
    > here it goes anyway!
    >
    > I have loads of files that are being automatically created via a VB
    > program. Each file is inividually taged and contains data about
    > promotional activities.
    >
    > I would like to be able to have a code in Excel that:
    >
    > - Reads the .txt files in the given location
    > - Finds the reference to the proper brand as selected in a drop down
    > menu on my spreadsheet
    > - Display the relevant information, formated if possible!
    > - That's it! :D
    >
    >
    > If you have any tips, let me know!
    >
    > I have a bad feeling that I'd need to be a fully trained programmer to
    > implement that...
    >
    >
    > --
    > Petitboeuf
    > ------------------------------------------------------------------------
    > Petitboeuf's Profile:

    http://www.excelforum.com/member.php...o&userid=10602
    > View this thread: http://www.excelforum.com/showthread...hreadid=494560
    >




+ Reply to Thread

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