Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Restricting users from inserting a new worksheet in MS Excel

Status
Not open for further replies.

zonash001

Programmer
Mar 10, 2004
15
PK
hi all....

I m working on Ms Excel file consisting of just a single worksheet. This file needs to be circuated to other users as well so that they can add their comments on it. I want all users to work on tht particular sheet i.e. users should not be able to insert/add a new worksheet to the file. Can anyone suggest how can i restrict the users???????
 
Private Sub Workbook_NewSheet(ByVal Sh As Object)
Dim s As Integer
Excel.Application.DisplayAlerts = False

s = MsgBox("can not add new worksheet")
Excel.ActiveWorkbook.ActiveSheet.Delete
Excel.Application.DisplayAlerts = False
End Sub

Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top