If you put anything in the far right column and try to insert a column, Excel won't do it. I will not move data off the edge of the spreadhsheet. Run this code and then try to insert either an entire column or an entire row. You won't be permitted.
With ActiveSheet
.Cells(.Rows.Count, .Columns.Count).Value = "x"
End With
That will allow the user to insert individual cells, just not whole columns or whole rows.
To forbid any insertions
With ActiveSheet
.Columns(.Columns.Count).Value = "x"
.Rows(.Rows.Count).Value = "x"
End With
Note that this doesn't effect deletions.
Bookmarks