Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Insert multiple rows

Is there a way to insert multiple rows at once without
highlighting the same number of rows beforehand? I want
to prompt the user to enter their desired number of rows
to insert.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Insert multiple rows


numRows = InputBox("Supply number of rows")
If numRows < "" Then
Activecell.Resize(numRows,1).Entirerow.Insert
End If

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"E. Edgington" wrote in message
...
Is there a way to insert multiple rows at once without
highlighting the same number of rows beforehand? I want
to prompt the user to enter their desired number of rows
to insert.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Insert multiple rows

n = clng( InputBox("Enter number of rows to insert"))
ActiveCell.Resize(n).EntireRow.Insert

--
Regards,
Tom Ogilvy

"E. Edgington" wrote in message
...
Is there a way to insert multiple rows at once without
highlighting the same number of rows beforehand? I want
to prompt the user to enter their desired number of rows
to insert.



Reply
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
Insert multiple rows mark909 Excel Discussion (Misc queries) 3 October 9th 09 07:51 PM
how do insert multiple rows in between multiple lines Ernie Excel Discussion (Misc queries) 1 January 15th 07 10:55 PM
Insert Multiple Rows Critzy Excel Discussion (Misc queries) 5 November 15th 06 05:43 PM
Insert Multiple rows Colm Setting up and Configuration of Excel 1 April 26th 06 07:44 PM
Insert Multiple Rows ucf1020 Excel Discussion (Misc queries) 3 November 1st 05 01:49 PM


All times are GMT +1. The time now is 02:36 PM.

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"