LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
PegL
 
Posts: n/a
Default

Now I'm not sure what you're really trying to do. The code FST1 provided
inserts a row above row 6. You'd obviously modify it to insert where you
want it. If you want to insert after a certain location, simply reference
the cell below it. Technically, you can't add a row in Excel. It has 65536
rows, period.

"Kiran" wrote:

Hi FST1,
thanks for replying. But I does not solve, what this code is doing is moving
the data from the selected row. I dont want to move data. When I click the
Get me a New Row button, I want to generate a new row.
So basically automating
Right-click - Insert Row below the selected cell.

Hope i was clearer this time

"FSt1" wrote:

hi,
To add a row to the sheet.....
Rows("6:6").Select
Selection.Insert Shift:=xlDown

To add a row to a range.........
Range("A6:I6").Select
Selection.Insert Shift:=xlDown

FSt1

"Kiran" wrote:

Can anyone let me know the code to add rows on a button click.
Thnx



 
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
Using other workbooks.. DavidMunday Excel Worksheet Functions 2 July 1st 05 07:35 AM
code to delete rows ianalexh Excel Discussion (Misc queries) 5 May 5th 05 10:46 AM
Make Change Case in Excel a format rather than formula Kevin Excel Worksheet Functions 1 March 18th 05 08:53 PM
excel: How can I color code rows based on a value in a cell? Parker1333 Excel Discussion (Misc queries) 2 February 1st 05 10:37 PM
Adding Rows to Master Sheet Excel Newbie New Users to Excel 1 December 23rd 04 10:56 PM


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