You can't encrypt the password itself, but you can lock the VBA project for viewing:
- Activate the Visual Basic Editor (if necessary).
- Select Tools | VBAProject Properties... (the name VBAProject might be different, if you have changed it).
- Activate the Protection tab.
- Tick the check box "Lock project for viewing".
- Enter a password in both boxes.
- Click OK.
- Save the workbook.
To see the effect, quit and restart Excel. When you open the workbook and want to view the VBA code, you'll have to provide the password.