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: 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
 
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
Macro to prevent adding sheet in a workbook. [email protected] Excel Programming 6 August 15th 06 03:49 AM
Prevent user from saving workbook keithl816 Excel Discussion (Misc queries) 3 January 15th 06 10:24 PM
prevent user from selecting and changing a sheet dirt Excel Programming 1 December 26th 04 10:17 PM
prevent user to rename sheet caroline Excel Programming 4 May 17th 04 01:29 PM
How to Prevent User from Unhiding Sheet Bruce B[_2_] Excel Programming 4 September 17th 03 10:01 AM


All times are GMT +1. The time now is 02:07 PM.

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

About Us

"It's about Microsoft Excel"