Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Jim Thomlinson for supplying this code for me.
However, now I get "Expected Function or Variable" on the OpenText part Dim bk As Workbook, rng As Range ChDir "C:\Temp" Set bk = Workbooks.OpenText(Filename:="C:\Temp\myfile.txt", _ Origin:=xlWindows, _ StartRow:=1, _ DataType:=xlFixedWidth, _ FieldInfo:=Array(Array(0, 1), _ Array(8, 1), Array(12, 1), Array(17, 1), _ Array(21, 1), Array(29, 1), Array(38, 1), _ Array(46, 1), Array(50, 1), Array(58, 1), _ Array(67, 1))) 'Missing last bracket Set rng = ActiveSheet.Range("A1").CurrentRegion Set rng = rng.Offset(1, 0).Resize(rng.Rows.Count - 1) Windows("daily.xls").Activate Sheets("table").Select Worksheets("table").Unprotect rng.Copy Destination:=Range("T2") What am I missing now? Thanks! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Keep getting error, wont run macro! HELP! | Excel Discussion (Misc queries) | |||
Date format from excel to CVS file wont. Change in CVS wont stay. | Excel Worksheet Functions | |||
Macro wont run! | Excel Discussion (Misc queries) | |||
Macro that wont go away - Help | Excel Worksheet Functions | |||
Help, Macro wont run from a particular worksheet | Excel Programming |