I've created a table for data entering. However, as user use it, they insert rows in the middle of the table. That messes the formula up as the functions were designed only work forward. Also sometimes when the user add row manually (just by typing into the next row after the last row of the table), the function were filled automatically but the function is incorrect quite often.
So I added a button to add the rows to the table and that works without problems. Now I want to disable the ability for user to add rows manually, meaning rows can ONLY be added via clicking the button.
As far as I research, people all suggesting using protect sheet functionality. But it would remove all ability to add rows including via VBA.
This is the code for the button (if it's of any relevant)
So I added a button to add the rows to the table and that works without problems. Now I want to disable the ability for user to add rows manually, meaning rows can ONLY be added via clicking the button.
As far as I research, people all suggesting using protect sheet functionality. But it would remove all ability to add rows including via VBA.
This is the code for the button (if it's of any relevant)
Code:
Sub InsertRow_Click()
Dim i As Integer
For i = 1 To 10
ActiveSheet.ListObjects("Invoice").ListRows.Add alwaysinsert:=True
Next i
End Sub