Ad row with button

D

Dennis

Can i make a button on a sheet to ad a row under the row where the button
in is? And by using the same button again another row under the earlier
inserted row? And if possible with auto numbering.

How does that works?
 
R

Ron de Bruin

If you use a button from the Forms toolbar you can assign this macro to it

Sub test()
Dim Rw As Long
Rw = ActiveSheet.Shapes(Application.Caller).TopLeftCell.Row
End Sub

Rw is the row number of the topleftcell now
See if you can use this
 
D

Dennis

I can`t get it working. I attached the code to the button but it won`t
work so i do something wrong. How do i assign the macro best to the button?
 
Top