Sub GL()
ChDir "C:WINDOWSDesktop"
Workbooks.OpenText Filename:="C:WINDOWSDesktopz.txt", Origin:=xlWindows _
, StartRow:=1, DataType:=xlFixedWidth, FieldInfo:=Array(Array(0, 1), Array( _
10, 1), Array(46, 1), Array(61, 1), Array(68, 1), Array(83, 1))
Columns("C:E").Select
Selection.Style = "Comma"
Columns("D:D").Select
Selection.ColumnWidth = 2.71
ActiveWindow.DisplayGridlines = False
Range("A1").Select
Columns("B:B").EntireColumn.AutoFit
Range("B18").Select
Columns("B:B").ColumnWidth = 37
Range("E11").Select
ActiveWindow.SmallScroll Down:=-15
Range("A1").Select
End Sub
This is what we did to make it work. This would take the file off the Desktop and grab the file if it was named z.txt. The rest is how we formatted the columns, so you might need to mess with that but i doubt it. Depending on what you are taking from the AS400. This is what our setup was for bringing in a G/L. Hope this helps.
Greg