LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
prevent user from deleting a tab prevent running macro from menu joemeshuggah Excel Programming 5 February 25th 10 10:58 PM
Prevent user from copying contents of a worksheet Chuck M Excel Discussion (Misc queries) 2 August 28th 08 02:28 AM
Prevent Inserting rows/columns Jase Excel Discussion (Misc queries) 3 April 15th 08 11:38 PM
Prevent user from inserting sheet via "CTRL-F11" [email protected] Excel Programming 3 October 9th 06 07:40 PM
How can I prevent Excel 2000 from inserting hyperlinks? RJL Jr. Setting up and Configuration of Excel 1 May 20th 05 12:15 PM


All times are GMT +1. The time now is 04:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"