create a control button to insert rows

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to creat a button on my spreadsheet then when you click on it you will
automatically insert a row above it.
 
I have a lot of different users to use my spreadsheet and some of them
continually mess up the whole insert row process so I am wanting to create a
button that all they have to do is click on and it will then automatically
insert rows for them. Thanks
 
Add an Active-X Command Button to your worksheet.

Then in the Sheet Code window select the object Command_Click (left
drop-down)and make it look like this:

Private Sub CommandButton1_Click()
ActiveCell.EntireRow.Insert '<<< Add this
End Sub

Hope this helps,
Jim May
 
There is an insert row button on the Tools>Customize>Commands>Insert category
that can be dragged to a new toolbar you crate by Tools>Customize>Toolbars>New

You can dock that most anywhere.

If you really want a macro assigned to a button, drop a button from the Forms
Toolbar onto your sheet and assign this code.

Sub insert()
Selection.EntireRow.insert
End Sub


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top