Results 1 to 5 of 5

Thread: Error with Protect and Unprotect through VBA

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,368
    Location
    Have you tried simply recording the .Protect part? I get:
    ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
    , AllowInsertingColumns:=True, AllowInsertingRows:=True, _
    AllowDeletingColumns:=True, AllowDeletingRows:=True, AllowSorting:=True
    I particularly note that the AllowUserInterfaceOnly argument is not included. You have included it in your code, and I would suspect (not tested though) that this would block the other options from being effective.

    Hope that helps,

    Mark
    Last edited by Aussiebear; 03-04-2025 at 02:14 PM.

Posting Permissions

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