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