Hello, a bit of an excel noob here, any help much appreciated!
I have (automatically generated) buttons that all need to reference the same macro. This macro needs to remove a range of cells based on the button's position... I have come across this code:
Sub Button1_Click()
With ActiveSheet.Buttons(1) 'Form Control
Range(.TopLeftCell.Offset(-3, 0), .BottomRightCell.Offset(4, 0)).EntireRow.Delete
End With
End Sub
Which works PERFECTLY for the first button created, however I need the button to be copied and pasted several times (a single macro to be able to be called)... does anyone know if this is possible in VBA? I was hoping for something like:
This.Button.Topleftcell ...
Again, any help much appreciated!
Bookmarks