premvinoth
New Member
- Joined
- Aug 4, 2015
- Messages
- 16
Hi,
First a big thanks to this forum for my learning in VBA here.
I have seven different text files named DVE, DVB, FAE, FAF, FAG, FAM, FAB.
I have a macro named D_Import(), when I run this macro it prompts me for a text file, and I select DVE.txt from it's location, then it imports the text file as per my requirement to the Excel and saves it as DVE.xls.
The same macro I repeat it for DVB.txt and it saves it as DVB.xls.
I have another macro named F_Import(), which I use for FAE, FAF, FAG, FAM, FAB text files and save it as respective excel files.
Now what I would like to do is, instead of running the macro 7 times, can I have a single one that imports 7 text files into 7 worksheets of a same workbook and name the sheets with the text file's name?
Note: D_Import() and F_Import() are different macros that handles text files with different formats and fields.
Thanks in advance,
Vinoth
First a big thanks to this forum for my learning in VBA here.
I have seven different text files named DVE, DVB, FAE, FAF, FAG, FAM, FAB.
I have a macro named D_Import(), when I run this macro it prompts me for a text file, and I select DVE.txt from it's location, then it imports the text file as per my requirement to the Excel and saves it as DVE.xls.
The same macro I repeat it for DVB.txt and it saves it as DVB.xls.
I have another macro named F_Import(), which I use for FAE, FAF, FAG, FAM, FAB text files and save it as respective excel files.
Now what I would like to do is, instead of running the macro 7 times, can I have a single one that imports 7 text files into 7 worksheets of a same workbook and name the sheets with the text file's name?
Note: D_Import() and F_Import() are different macros that handles text files with different formats and fields.
Thanks in advance,
Vinoth