Protecting Table Automatically
There is an Excel file that teaches how to perform the Protecting Table Automatically operation.
Excel-Based Protecting Table Automatically
This workbook demonstrates protecting table automatically using VBA macros on a 2-row data layout.
Hope it is useful.