Yes.
You must lock the project from viewing.
In VBE right-click the workbook/project and Properties>Protection.
Check the lock from viewing and add a password.
The workbook must be saved and closed before protection of code takes place.
Gord Dibben MS Excel MVP