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

  • Thread starter Thread starter Petitboeuf
  • Start date Start date
P

Petitboeuf

Hi all

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

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...
 
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/dataexamples/externaldataexamples.htm

or here

http://www.dicks-clicks.com/excel/ExternalData6.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.aspx?scid=kb;en-us;151262
Working with Sequential Access Files

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