EXCEL VBA Questions and Answers

How can you prevent a user for adding or deleting sheets?

You need to protect the workbook’s structure.
Excel 2003 –>
Select Tools – Protection – Protect Workbook. In the Protect Workbook dialog box, make sure that the Structure checkbox is checked.
Excel 2007/2010 –>
Go to Review –> Click ‘Protect Workbook’ –> Click ‘Protect Structure and Windows’
If you specify a password, that password will be required to unprotect the workbook. When a workbook’s structure is protected, the user may not:
* Add/Delete a sheet
* Hide/Unhide a sheet
* Rename a sheet
* Move a sheet