View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
DocBrown DocBrown is offline
external usenet poster
 
Posts: 119
Default Prevent user from Inserting new worksheet

What is the approach I could use to prevent the user from adding new blank
worksheets using the Insert.. Worksheet... function? I've found the
Workbook_NewSheet event but this fires after the sheet has been created.

I have a command button on the sheet that creates the new sheets for the
user by copying a hidden template sheet. This macro does not trigger the
NewSheet event.

In the Workbook_NewSheet event, I can call the delete method:

ActiveWorkbook.Sheets(Sh.Name).Delete

but this generates the "Data may exist in sheet(s)... Warning. How do I
supress this?
Thanks