3 part question:
1) I need to import a text file to position A1 of sheet 1 of a workbook. There are 20 fields in each row and about 200 rows per file. I then need to sort the text file based on the values in Column A. If the value is "A", I need to write that row to sheet 2, if the value is "B", I need to write it to sheet 3.
2) The files I will import reside at H:\Data\Posted, and have names like XYZMMDDYY.txt, where XYZ is the file type and MMDDYY is the date posted. There are several file types, ABC, NMP, etc., and 20 days worth of data.
3) I need to export sheets 2 & 3 to location H:\Data\Processed. I will use a name like File_2_MMDDYY.txt where "2" is the sheet number and MMDDYY is the date I exported.
Per below, I'd like the above to be accomplished via sub-routine/macro and launched via user controls. Any VBA coding help to accomplish the above would be greatly appreciated if you don't want to mess with the next part.
I want to control the above with a User Form incorporating user controls like drop-downs and buttons. I want 3 drop-downs; Import file type - XYZ, ABC, etc, Date - MMDDYY, defaulting to today but allowing me to change it (maybe use a calendar control), and Export file type - File_2 or File_3. I'd like an Import button, which based on my drop-down choices, goes to H:\Data\Posted and imports a file like XYZ083106.txt to sheet 1, position A1. I'd like a second button, Sort, which would launch the sort described in 1) above, and finally, I'd like a third button, Export, which would export the data on sheets 2 or 3 (depending on the circumstance, so I'd have to be able to choose sheet 2 or 3) per 3) above, again, creating a export file name from the drop-downs.
I'm asking a lot here; I don't even know where to begin. So I'll say thank you in advance for any help.
C
1) I need to import a text file to position A1 of sheet 1 of a workbook. There are 20 fields in each row and about 200 rows per file. I then need to sort the text file based on the values in Column A. If the value is "A", I need to write that row to sheet 2, if the value is "B", I need to write it to sheet 3.
2) The files I will import reside at H:\Data\Posted, and have names like XYZMMDDYY.txt, where XYZ is the file type and MMDDYY is the date posted. There are several file types, ABC, NMP, etc., and 20 days worth of data.
3) I need to export sheets 2 & 3 to location H:\Data\Processed. I will use a name like File_2_MMDDYY.txt where "2" is the sheet number and MMDDYY is the date I exported.
Per below, I'd like the above to be accomplished via sub-routine/macro and launched via user controls. Any VBA coding help to accomplish the above would be greatly appreciated if you don't want to mess with the next part.
I want to control the above with a User Form incorporating user controls like drop-downs and buttons. I want 3 drop-downs; Import file type - XYZ, ABC, etc, Date - MMDDYY, defaulting to today but allowing me to change it (maybe use a calendar control), and Export file type - File_2 or File_3. I'd like an Import button, which based on my drop-down choices, goes to H:\Data\Posted and imports a file like XYZ083106.txt to sheet 1, position A1. I'd like a second button, Sort, which would launch the sort described in 1) above, and finally, I'd like a third button, Export, which would export the data on sheets 2 or 3 (depending on the circumstance, so I'd have to be able to choose sheet 2 or 3) per 3) above, again, creating a export file name from the drop-downs.
I'm asking a lot here; I don't even know where to begin. So I'll say thank you in advance for any help.
C