https://quadexcel.com/wp/excel-vba-tutorial-102-passwording-a-vba-project/
Excel VBA Tutorial 102 - Passwording a VBA Project