Consulting

Results 1 to 2 of 2

Thread: Protecting a Sheet But Allowing Certain Features

  1. #1
    VBAX Regular
    Joined
    Jul 2015
    Posts
    8
    Location

    Protecting a Sheet But Allowing Certain Features

    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?
    Attached Images Attached Images

  2. #2
    VBAX Regular
    Joined
    Jul 2015
    Posts
    8
    Location
    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, _
    AllowInsertingHyperlinks:=True

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •