ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VB Code to 'read' .txt files and display info in Excel (https://www.excelbanter.com/excel-programming/348438-vbulletin-code-read-txt-files-display-info-excel.html)

Petitboeuf[_4_]

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! :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...


--
Petitboeuf
------------------------------------------------------------------------
Petitboeuf's Profile: http://www.excelforum.com/member.php...o&userid=10602
View this thread: http://www.excelforum.com/showthread...hreadid=494560


Tom Ogilvy

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 he


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

or here

http://www.dicks-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" wrote
in message ...

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...


--
Petitboeuf
------------------------------------------------------------------------
Petitboeuf's Profile:

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





All times are GMT +1. The time now is 04:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com