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: 9
Default Insert Mult. Rows

I am trying to create a macro that a user can insert a row or rows based on
input boxes at any desired row. The code I have put together is below (there
is more to it than this but this is the base).

The problem is with the line,
Rows("InsertRow:EndRow").Select
It errors out. Any suggestions would be appreciated.
I am using Excel 97.

Dim InsertRow As Integer
Dim NumberOfRows As Integer
Dim EndRow As Integer

InsertRow = InputBox("Enter the Row Number where you want to Insert the
row.")
NumberOfRows = InputBox("Enter how many Rows you want to Insert.")
EndRow = InsertRow + NumberOfRows

Rows("InsertRow:endrow").Select
Selection.Insert Shift:=xlDown


appeng
 
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
How to increase the shading when highlighting mult. rows w/ mouse donato11 Excel Discussion (Misc queries) 0 November 19th 09 11:23 PM
Comparing data in mult rows then summing unique values Cathy Landry Excel Discussion (Misc queries) 2 March 17th 09 11:27 PM
Vlookup to insert num in mult. columns Duplatt Excel Discussion (Misc queries) 8 December 23rd 07 11:07 PM
I want to be able to insert 1 Excel Wkbk (w mult tabs) into anothe TJ Excel Worksheet Functions 1 November 12th 04 03:08 PM
Need help with array formula to count rows w/ mult.criteria Ed[_9_] Excel Programming 15 February 3rd 04 01:36 PM


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