Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Greetings:
In Excel 2007, I wrote a macro to insert a line between all visible rows. However, one portion of the code fails and I am unable to isolate the reason. The specific error is: Microsoft Visual Basic "Run-time error '1004': Insert method of Range class failed The section of the following code that fails is "Selection.EntireRow.Insert". Any suggestions would be appreciated. Thank you. ' select range for unique filter and insert rows Range("A1").Select Application.CutCopyMode = False Range("A:A").AdvancedFilter Action:=xlFilterInPlace, Unique:=True Range("A2").Select Range(Selection, Selection.End(xlDown)).Select Selection.SpecialCells(xlCellTypeVisible).Select Selection.EntireRow.Insert , CopyOrigin:=xlFormatFromLeftOrAbove ActiveSheet.ShowAllData |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Run-time-error 1004 "ListIndex method of listbox class failed" | Excel Programming | |||
how do I correct a "run time error 1004-unable to open" problem? | Excel Programming | |||
"run-time error '1004' - select method of range failed" | Excel Programming | |||
Run-time error "1004" Select method of range class failed | Excel Discussion (Misc queries) | |||
"Run-time error '1004'" Method 'Range' of object '_global' failed. | Excel Programming |