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: 1
Default Programmatically inserting a row with Excel 2003

The VBA method for inserting a row in previous versions of Excel generates a run-time error '1004' Application-defined or object-defined error. Has the code model changed

Here's the sample code that will generate the error - It comes straint from KB Article - 291305 for Excel 2000 or Excel 9

Sub Insert_Rows_Loop(
Dim Current Sheet as Objec

' Loop through all selected sheet
For Each CurrentSheet in ActiveWindow.Selected Sheet
' Insert 5 rows at top of each shee
CurrentSheet.Range("a1:a5").EntireRow.Insert '*******This row generates the erro
Next CurrentShee
End Su

Any help you could provide would be most appreciated


 
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
Inserting a checkbox into Excel 2003 Ashley Excel Discussion (Misc queries) 2 April 2nd 23 01:51 PM
Inserting pictures in Excel 2003 jawone48 Excel Discussion (Misc queries) 6 August 11th 07 06:17 AM
Inserting Rows in Excel 2003 Marilyn Excel Discussion (Misc queries) 5 February 7th 07 04:28 PM
inserting an address into excel 2003 bobby02169 Excel Discussion (Misc queries) 1 December 15th 06 07:41 PM
Excel 2003 Inserting current date mark Excel Discussion (Misc queries) 3 February 9th 05 05:51 PM


All times are GMT +1. The time now is 10:20 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"