I have "borrowed" some code that will allow me to import one txt file and do some formatting on it. Normally, when I doing this process, I have to run it 5 or 6 times to import 5 or 6 different files. Is there a way to modify this code so that I can select multiple files and then have the code process each txt file one at a time? When I download the files from the mainframe, I save them all to the same directory. In other words, my thinking is that when this code prompts me to pick a single file, that I could just pick multiple files, then continue with the importing.
Public Sub DoTheImport()
Dim FName As Variant
Dim Sep As String
FName = Application.GetOpenFilename("All files (*.*), *.*", , "Select the Check Register Report you want to open.")
If FName = False Then
MsgBox "You didn't select a file"
Exit Sub
End If
Workbooks.OpenText Filename:=FName, _
Origin:=xlWindows, StartRow:=8, DataType:=xlFixedWidth, FieldInfo:= _
Array(Array(0, 1), Array(11, 1), Array(22, 1), Array(53, 1), Array(65, 1), Array(74, 1), _
Array(79, 1))
ActiveCell.SpecialCells(xlLastCell).Select
Range(Selection, Cells(1)).Select
(etc.)
Any help or guidance is appreciated



