Prevent Worksheet Deletions

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to prevent a user from deleting certain worksheets yet still
being able to insert new worksheets?

Thanks,
Karen........
 
Karen

Not without using VBA.

You would have the workbook protected to prevent deleting sheets.

Run a macro which would unprotect the workbook and add a given or chosen
number of sheets then reprotect the workbook.

Record a macro while you go through the above steps to add one sheet.

Will look something like this.

Sub Sheets_Add()
Dim i As Long
Application.ScreenUpdating = False
ActiveWorkbook.Unprotect Password:="justme"
howmany = InputBox("Number of Sheets to insert")
For i = 1 To howmany
Sheets.Add
Next i
ActiveWorkbook.Protect Password:="justme", Structure:=True
Application.ScreenUpdating = True
End Sub


Gord Dibben Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top