Insert row on button position

Q45

New Member
Joined
Feb 17, 2002
Messages
32
How do I insert a row using a macro button that insert the row beneath the row that the macro button is touching?
 
I've tried it 100 times and I that's not working but I get the idea. That's exactly what I want but I just need to know how to complete it. I don't know what the missing link in the code is. Can you help?
 
Upvote 0

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
I think the problem you're having is the "type" of button you are using. Use a button from the Control Toolbar. Then, doubleclick on it, and paste this macro there:

Private Sub CommandButton1_Click()
ActiveCell.Select
CommandButton1.BottomRightCell.Offset(1).EntireRow.Insert
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,858
Messages
6,121,956
Members
449,057
Latest member
FreeCricketId

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top