LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Trying to insert rows in a Macro

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!



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to insert Rows [email protected] Excel Programming 4 August 17th 08 01:00 PM
MACRO TO INSERT ROWS K[_2_] Excel Programming 6 February 15th 08 04:20 PM
asking again, macro to insert rows Luke Excel Worksheet Functions 12 September 18th 05 06:32 PM
Insert Rows Macro Todd Excel Programming 4 April 2nd 04 09:48 PM
macro to insert rows. Todd[_5_] Excel Programming 2 September 27th 03 11:09 PM


All times are GMT +1. The time now is 08:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"