Results 1 to 4 of 4

compile error can't assign to read-only property vba

Threaded View

smorgan5765 compile error can't assign to... 01-28-2013, 12:54 AM
:) Sixthsense :) Re: compile error can't... 01-28-2013, 01:23 AM
smorgan5765 Re: compile error can't... 02-01-2013, 03:34 PM
smorgan5765 Re: compile error can't... 02-05-2013, 11:17 PM
  1. #1
    Registered User
    Join Date
    01-11-2013
    Location
    tennessee
    MS-Off Ver
    Excel 2010
    Posts
    8

    compile error can't assign to read-only property vba

    Wrote a simple code to unlock the grouping function in a protected worksheet seen below
    Private Sub Workbook_Open()
    MsgBox ("Select Your Tab Before Entering Data"), vbInformation
    Dim sht As Worksheet
    For Each sht In Worksheets
        With sht
            .Protect Password:="11111", userinterfaceonly:=True
            .EnableOutlining = True
                End With
    Next 'sht
    End Sub

    Later added additional code to edit the objects in the protected woksheet

    .ProtectDrawingObjects = False

    Now I get the following error: Compile error: can't assign to read-only property


    Can anyone help this noobe fix this???


    Moderator's Note: Don't foget to use code tags. I'll do it for now. Thanks.
    Last edited by smorgan5765; 02-01-2013 at 03:30 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1