1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| ChDir "Y:\FTSE\End_of_Day\Position_Files"
Workbooks.OpenText Filename:= _
"Y:\FTSE\End_of_Day\Position_Files\P1_*.txt", Origin:= _
xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, _
Comma:=False, Space:=False, Other:=False, FieldInfo:=Array(1, 1), _
TrailingMinusNumbers:=True
Range("B3:D3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Windows("EOD_Template_FTSE.xls").Activate
Range("A5").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Selection.Sort Key1:=Range("A5"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Windows("P1_20070416_16_48_04.txt").Activate
ActiveWindow.Close
End Sub |
Partager