Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I have a macro that imports a text file. There is something in the text file that is throwing error 1004 and I am not sure exactly what it is. The code is: Sub terr_100() ChDir "\\dynamics\Documents\Terry\EOD_REPORTS" Workbooks.OpenText Filename:= _ "\\dynamics\Documents\Terry\EOD_REPORTS\100_daily_ ar.txt", Origin:=437, StartRow _ :=1, DataType:=xlFixedWidth, FieldInfo:=Array(Array(0, 1), Array(14, 1), Array _ (51, 1), Array(65, 1), Array(78, 1), Array(91, 1), Array(104, 1), Array(117, 1)), _ TrailingMinusNumbers:=True Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select Windows("100_daily_ar.txt").Activate Sheets("100_daily_ar").Select Sheets("100_daily_ar").Move after:=Workbooks("all a.r.xls").Sheets(1) Selection.EntireRow.SpecialCells(xlBlanks).EntireR ow.Delete End Sub The row that is causing the error is: Selection.EntireRow.SpecialCells(xlBlanks).EntireR ow.Delete The error that I get is Run-Time error 1004, cannot use that command on overlapping selections. I do not see where I am overlapping any sections. Can anyone help with this? Thanks Terry |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Runtime error 1004 | Excel Discussion (Misc queries) | |||
runtime error 1004 | Excel Discussion (Misc queries) | |||
Excel 2003 Macro Error - Runtime error 1004 | Excel Discussion (Misc queries) | |||
Runtime error 1004 | Excel Programming | |||
runtime error 1004 | Excel Programming |