A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
If you want to prevent users from viewing or editing the VBA code:
- Activate the Visual Basic Editor (Alt+F11).
- Select Tools > VBA Project Properties...
- Activate the Protection tab.
- Select the 'Lock project for viewing' check box.
- Enter a password, and confirm it by entering it again in the box below.
- Click OK.
- Switch back to Excel.
- Save the workbook.
Next time the workbook is opened, it will not be possible to view the VBA code unless you enter the correct password.