Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Alex,
Try this Sub macro1() Dim oThisFile As Workbook '<<<<<<<<<<<<<<<<<<<< New code Workbooks.OpenText Filename:="E:\UDC\2.TXT", Origin:=xlWindows, Set oThisFile As ActiveWorkbook '<<<<<<<<<<<<<<<<<<<< New code StartRow _ :=7, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _ ConsecutiveDelimiter:=True, Tab:=True, Semicolon:=False, Comma:=False, _ Space:=True, Other:=False, FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3 _ , 1), Array(4, 1), Array(5, 1), Array(6, 1), Array(7, 1), Array(8, 1)) Range("F13").Select Selection.Copy Windows("DAILY OPERATIONS_2004.xls").Activate Range("C8").Select ActiveSheet.Paste Range("E8").Select Windows("2.TXT").Activate Range("F14").Select Application.CutCopyMode = False Selection.Copy Windows("DAILY OPERATIONS_2004.xls").Activate ActiveSheet.Paste Range("J8").Select Windows("2.TXT").Activate Range("E17").Select Application.CutCopyMode = False Selection.Copy Windows("DAILY OPERATIONS_2004.xls").Activate ActiveSheet.Paste Range("K8").Select Windows("2.TXT").Activate Range("G18").Select Application.CutCopyMode = False Selection.Copy Windows("DAILY OPERATIONS_2004.xls").Activate ActiveSheet.Paste ActiveWindow.LargeScroll ToRight:=2 Range("AI8").Select Windows("2.TXT").Activate Range("F18").Select Application.CutCopyMode = False Selection.Copy Windows("DAILY OPERATIONS_2004.xls").Activate ActiveSheet.Paste oThisFile.Close '<<<<<<<<<<<<<<<<<<<< New code -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "alexm999 " wrote in message ... Here's the code: what can i add to get the file 2.txt to close at the end? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Issue with a macro | Excel Discussion (Misc queries) | |||
Macro issue 2 | Excel Discussion (Misc queries) | |||
Macro issue | Excel Discussion (Misc queries) | |||
Macro issue | Excel Discussion (Misc queries) | |||
Macro Issue | New Users to Excel |