ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   is it possible to unable the user to add more sheets to a workboo (https://www.excelbanter.com/excel-programming/335042-possible-unable-user-add-more-sheets-workboo.html)

François

is it possible to unable the user to add more sheets to a workboo
 
Same question
is it possible to disable to deletion of worksheet in a workbook ?

Thanks for your help




Denys[_2_]

is it possible to unable the user to add more sheets to a workboo
 
Bonjour François,

If you password protect your workbook, then you can't add or delete a
worksheet.

Hope this was helpful

Denys

"François" wrote:

Same question
is it possible to disable to deletion of worksheet in a workbook ?

Thanks for your help




Bob Phillips[_7_]

is it possible to unable the user to add more sheets to a workboo
 
Bit kludgy, but seems to work

Private Sub Workbook_NewSheet(ByVal Sh As Object)
Application.DisplayAlerts = False
Sh.Delete
Application.DisplayAlerts = True
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code


--
HTH

Bob Phillips

"François" wrote in message
...
Same question
is it possible to disable to deletion of worksheet in a workbook ?

Thanks for your help






jjk

is it possible to unable the user to add more sheets to a workboo
 
Using menu Goto
Tools - Protection - Protect Workbook
Make sure Structure is checked.

Programatically
ThisWorkbook.Protect Structu=True

Regards,
Jayant



All times are GMT +1. The time now is 08:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com