Code so that worksheets cannot be added to workbook

  • Thread starter Thread starter D
  • Start date Start date
D

D

Does anyone know if it is possible to have a code in the background that will
not let users add worksheets to a workbook? If so, how would this be done?
 
hi
personally i don't know how you can prevent users from adding new sheets but
you can delete them as fast as they are added.

Private Sub Workbook_NewSheet(ByVal Sh As Object)
MsgBox "new sheet are prohibited."
Application.DisplayAlerts = False
ActiveSheet.Delete
Application.DisplayAlerts = True
End Sub

regards
FSt1
 
This is awesome!! Works great. Perfect for those workbooks that users are
having to paste data to that is linked to say another workbook or program.

Thanks!
 
You could protect the workbook's structure.

But that will prevent new sheets, moving existing sheets, deleting sheets,
renaming sheets...

In xl2003 menus:
tools|protection|protect workbook
 
Back
Top