Code so that worksheets cannot be added to workbook

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?
 
F

FSt1

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
 
D

D

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!
 
D

Dave Peterson

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
 
Top