View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Subodh Subodh is offline
external usenet poster
 
Posts: 99
Default prevent a user from adding any sheet in a workbook

I have an excel workbook in which i don't want the user to add any
sheets.
I tried following code to delete the sheet every time a new sheet is
inserted.
However, Microsoft generates a message and user has to select Delete
key every time
and if the user presses cancel then a sheet is inserted.
How can i automatically make the Delete selection so that user cannot
insert aany sheets.

Private Sub Workbook_NewSheet(ByVal Sh As Object)
Sh.Delete
End Sub