Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


in excell I want to put in a button to insert a row

Posted on 2011-04-21
Medium Priority
Last Modified: 2012-05-11
I  want to put in a button that just inserts a new row above row 2

Question by:TIMFOX123
LVL 24

Accepted Solution

StephenJR earned 668 total points
ID: 35439768

Assisted Solution

sah18 earned 664 total points
ID: 35439833
Here is a step-by-step tutorial on how to insert a button into an Excel worksheet and then to assign a macro to it:


The macro is the behavior that will occur when the button is clicked.  StephenJR has already provided the macro information that should work.

Hope this helps!
LVL 24

Expert Comment

ID: 35439854
Thanks sah18, missed that. Basically right-click the button and assign macro.
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

LVL 34

Assisted Solution

by:Rob Henson
Rob Henson earned 668 total points
ID: 35439859
There is a standard button available for inserting rows.

In Excel 2003 - Right click on the toolbars and Select Customize. In the left hand pane select Insert and the right hand pane will change to show all buttons available, one of which is Insert Row.

Drag the Insert Rows button option to a tool bar.

Click Close. Job Done. This will then show for all files and will insert a row above the active row so if you specifically want it above row 2, ensure the active cell is in row 2 when clicking the button.

Rob H
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 35440079
While there are suggestions here is my innovative one. Although it appears a bit clumsy but I think it is just right for your scenario.

Insert this macro in the workbook module for the worksheet and change the second line to accommodate the name of your worksheet. Save the file, close it and open it.

This will create a triangle at the left edge of the worksheet which is not printable. Clicking on this triangle will insert a row at row 2.


Private Sub Workbook_Open()
Set sh = Sheets("sheet1")
For Each shp In sh.Shapes
If Right(shp.OnAction, 23) = "ThisWorkbook.inslineat2" Then shp.Delete
Next shp
Set a = sh.Shapes.AddShape(msoShapeIsoscelesTriangle, 0, 0, 5, [a1].Height)
a.OnAction = "ThisWorkbook.inslineat2"
a.Rotation = 180
a.OLEFormat.Object.PrintObject = False
a.Fill.ForeColor.SchemeColor = 8
a.Fill.Visible = msoTrue
a.Line.Visible = msoFalse
End Sub
Sub inslineat2()
End Sub

Open in new window


Author Closing Comment

ID: 35440251
Great job

Actually I pretty much knew how to do this in the old excel,   the new excel is so different


Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question