![]() |
Need help importing a text file
Hello everyone, I am new to this forum as well as VBA. I am doing pretty well with m macros but I am having two major problem that I can't find an answe to. At work I have to create a lot of sales reports in excel, wit imported data from our proprietary system. I import them as tex files. I have been able to import a text file only if I program in th name of the text file. The name of the text file is always different. I want to be able to choose the name of the text file. Is thi possible with VBA? Thank you, Danie -- Djbloi ----------------------------------------------------------------------- Djblois's Profile: http://www.excelforum.com/member.php...fo&userid=2596 View this thread: http://www.excelforum.com/showthread.php?threadid=39328 |
Need help importing a text file
You'd want to do something like this:
Dim FName As Variant FName = Application.GetOpenFilename("CSV File (*.csv), *.csv") If FName < False Then ''open code goe here End If -- Jim "Djblois" wrote in message ... | | Hello everyone, | | I am new to this forum as well as VBA. I am doing pretty well with my | macros but I am having two major problem that I can't find an answer | to. At work I have to create a lot of sales reports in excel, with | imported data from our proprietary system. I import them as text | files. I have been able to import a text file only if I program in the | name of the text file. The name of the text file is always different. | I want to be able to choose the name of the text file. Is this | possible with VBA? | | Thank you, | Daniel | | | -- | Djblois | ------------------------------------------------------------------------ | Djblois's Profile: http://www.excelforum.com/member.php...o&userid=25961 | View this thread: http://www.excelforum.com/showthread...hreadid=393286 | |
All times are GMT +1. The time now is 07:57 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com