Protect Excel Worksheet as UserInterfaceOnly with VBA

Protect an Excel worksheet as UserInterfaceOnly so VBA macros can still edit it, let users expand and collapse groups with EnableOutlining, and reapply it on Workbook_Open.