Hi to everyone and Happy New Year.
I wrote a very simple VBA code (associated to a hot key CTRL+D) to delete the current row in a sheet:
Sub del_row()
Set foglioattivo = ActiveWorkbook.ActiveSheet
Rows(ActiveCell.Row).Delete
End Sub
I would like this to work only from row 9 to row 40, so that if the users mistakenly hit CTRL+D on the first rows it doesn't delete anything.
How can I do that?
Thank you very much.
Matt
I wrote a very simple VBA code (associated to a hot key CTRL+D) to delete the current row in a sheet:
Sub del_row()
Set foglioattivo = ActiveWorkbook.ActiveSheet
Rows(ActiveCell.Row).Delete
End Sub
I would like this to work only from row 9 to row 40, so that if the users mistakenly hit CTRL+D on the first rows it doesn't delete anything.
How can I do that?
Thank you very much.
Matt