View Full Version : Protecting a Sheet But Allowing Certain Features

08-06-2015, 06:46 AM
Hi guys,

I am trying to protect a sheet using the command:
Sheets("All Projects").Protect "test"

I was wondering how to edit this sheet so that some features are allowed. I would like to enable all features except for column insertion and column deletion. Can someone please help me out?

08-07-2015, 08:49 AM
I got it figured out. This is the code I used if anyone else had a similar question:

Sheets("All Projects").Protect _
password:="test", _
AllowFormattingColumns:=True, _
AllowFormattingRows:=True, _
AllowFormattingCells:=True, _
AllowInsertingRows:=True, _
AllowDeletingRows:=True, _
AllowSorting:=True, _
AllowUsingPivotTables:=True, _
AllowFiltering:=True, _
Scenarios:=True, _
DrawingObjects:=True, _

"All PROJECTS" is the name of my workbook. You can also use ActiveSheet