Disable worksheet insertion.

Microsoft Book: office excel 2003 inside...
August 6, 2009 at 04:28:05
Specs: Windows XP, pentium 4 3.00Ghz. 1gb ram
Hi all,
How i can disable worksheet insertion in my workbook. i don't want to use workbook protection instead i want to use worksheet protection.

See More: Disable worksheet insertion.

Report •


#1
August 6, 2009 at 06:39:51
Assuming macros are enabled on your user's machines, put this in the ThisWorkbook module of your workbook.

Private Sub Workbook_NewSheet(ByVal newSht As Object)
 Application.DisplayAlerts = False
 Application.ScreenUpdating = False
  newSht.Delete
 Application.DisplayAlerts = True
 Application.ScreenUpdating = True
  MsgBox "Adding Worksheets Has Been Disabled In This Workbook."
End Sub

You'll need to hide and password protect the code to prevent users from seeing/disabling it.


Report •

#2
August 6, 2009 at 22:23:40
Thanks Derby, Thumbs up! for your code.

Report •

#3
August 7, 2009 at 06:52:55
Thumbs Up? So how come I got a -1? <g>

Report •

Related Solutions

#4
August 10, 2009 at 10:23:02
How about a -2 ? lol

Report •

#5
August 10, 2009 at 11:28:40
Careful, if I go bronze, no one will ever take me seriously again.

Report •

#6
August 11, 2009 at 04:11:06
sorry derby, i am new to this site so i missed on ratings. you know i tried +10 but stucked on -1.

Report •

#7
August 11, 2009 at 06:38:23
No problem. The rating system is fairly new and it's been kind of a running joke for some of us "old-timers".

Responses 3 - 5 are part of that running joke.

Hey Justin - No offense!


Report •


Ask Question