J
jerryb123
Hello, all:
I'm trying to record a macro that will autofilter a selection, select all
visible rows, and insert new rows. Here is the section of the code generated
by the Macro Recorder:
Cells.Select
Selection.AutoFilter
Selection.AutoFilter Field:=2, Criteria1:="1"
Rows("2:2234").Select
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.Insert Shift:=xlDown
It always hangs up on the last line, with the following message:
Run-time error '1004':
Insert method of Range class failed
I can't figure out why it isn't working; any suggestions or help are greatly
appreciated. Thanks!
I'm trying to record a macro that will autofilter a selection, select all
visible rows, and insert new rows. Here is the section of the code generated
by the Macro Recorder:
Cells.Select
Selection.AutoFilter
Selection.AutoFilter Field:=2, Criteria1:="1"
Rows("2:2234").Select
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.Insert Shift:=xlDown
It always hangs up on the last line, with the following message:
Run-time error '1004':
Insert method of Range class failed
I can't figure out why it isn't working; any suggestions or help are greatly
appreciated. Thanks!