+ Reply to Thread
Results 1 to 7 of 7

Object Editing under protection

  1. #1
    Forum Contributor TheRetroChief's Avatar
    Join Date
    09-30-2008
    Location
    UK
    MS-Off Ver
    2019
    Posts
    136

    Object Editing under protection

    Greetings,

    I use several macros in a sheet, however every time one is run the protection settings on the workbook reset and i can no longer use the black + to drag and copy cell information from a cell that has a drop-down.

    Is there a way i can ensure that the macro, when reinstating protection on the worksheet, will still allow the user to edit objects (i.e. cells with validation drop-downs)?

    Could this be an Excel 2003 thing as I am told it doesn't happen in 2000?

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Try recording a macro whilst doing this manually, that way you will get the right syntax
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436
    There are certainly different options with protection between the versions.

    Use 2003 and the macro recorder whilst applying the level of protection you want.
    Cheers
    Andy
    www.andypope.info

  4. #4
    Forum Contributor TheRetroChief's Avatar
    Join Date
    09-30-2008
    Location
    UK
    MS-Off Ver
    2019
    Posts
    136
    I have absolutely no idea how i would go about recording the calendar pop up macro manually!!

    My present code is this:
    Please Login or Register  to view this content.
    Christ knows how i could do that manually.
    Can it be achieved by using any of this jazz in the 'protect method'...
    Protects a worksheet so that it cannot be modified.

    expression.Protect(Password, DrawingObjects, Contents, Scenarios, UserInterfaceOnly, AllowFormattingCells, AllowFormattingColumns, AllowFormattingRows, AllowInsertingColumns, AllowInsertingRows, AllowInsertingHyperlinks, AllowDeletingColumns, AllowDeletingRows, AllowSorting, AllowFiltering, AllowUsingPivotTables)
    expression Required. An expression that returns a Worksheet object.

    Password Optional Variant. A string that specifies a case-sensitive password for the worksheet or workbook. If this argument is omitted, you can unprotect the worksheet or workbook without using a password. Otherwise, you must specify the password to unprotect the worksheet or workbook. If you forget the password, you cannot unprotect the worksheet or workbook. It's a good idea to keep a list of your passwords and their corresponding document names in a safe place.

    DrawingObjects Optional Variant. True to protect shapes. The default value is False.

    Contents Optional Variant. True to protect contents. For a chart, this protects the entire chart. For a worksheet, this protects the locked cells. The default value is True.

    Scenarios Optional Variant. True to protect scenarios. This argument is valid only for worksheets. The default value is True.

    UserInterfaceOnly Optional Variant. True to protect the user interface, but not macros. If this argument is omitted, protection applies both to macros and to the user interface.

    AllowFormattingCells Optional Variant. True allows the user to format any cell on a protected worksheet. The default value is False.

    AllowFormattingColumns Optional Variant. True allows the user to format any column on a protected worksheet. The default value is False.

    AllowFormattingRows Optional Variant. True allows the user to format any row on a protected. The default value is False.

    AllowInsertingColumns Optional Variant. True allows the user to insert columns on the protected worksheet. The default value is False.

    AllowInsertingRows Optional Variant. True allows the user to insert rows on the protected worksheet. The default value is False.

    AllowInsertingHyperlinks Optional Variant. True allows the user to insert hyperlinks on the worksheet. The default value is False.

    AllowDeletingColumns Optional Variant. True allows the user to delete columns on the protected worksheet, where every cell in the column to be deleted is unlocked. The default value is False.

    AllowDeletingRows Optional Variant. True allows the user to delete rows on the protected worksheet, where every cell in the row to be deleted is unlocked. The default value is False.

    AllowSorting Optional Variant. True allows the user to sort on the protected worksheet. Every cell in the sort range must be unlocked or unprotected. The default value is False.

    AllowFiltering Optional Variant. True allows the user to set filters on the protected worksheet. Users can change filter criteria but can not enable or disable an auto filter. Users can set filters on an existing auto filter. The default value is False.

    AllowUsingPivotTables Optional Variant. True allows the user to use pivot table reports on the protected worksheet. The default value is False.

    Remarks
    If you apply the Protect method with the UserInterfaceOnly argument set to True to a worksheet and then save the workbook, the entire worksheet (not just the interface) will be fully protected when you reopen the workbook. To re-enable the user interface protection after the workbook is opened, you must again apply the Protect method with UserInterfaceOnly set to True.

    If changes wanted to be made to a protected worksheet, it is possible to use the Protect method on a protected worksheet if the password is supplied. Also, another method would be to unprotect the worksheet, make the necessary changes, and then protect the worksheet again.

    Note 'Unprotected' means the cell may be locked (Format Cells dialog) but is included in a range defined in the Allow Users to Edit Ranges dialog, and the user has unprotected the range with a password or been validated via NT permissions.

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    No add the protection manually, selecting from the options available in 2003

  6. #6
    Forum Contributor TheRetroChief's Avatar
    Join Date
    09-30-2008
    Location
    UK
    MS-Off Ver
    2019
    Posts
    136
    Do you mean record a macro of me adding the protection manually???

  7. #7
    Forum Contributor TheRetroChief's Avatar
    Join Date
    09-30-2008
    Location
    UK
    MS-Off Ver
    2019
    Posts
    136
    Woo-hoo!!! Managed to do it myself!!!

    This did the trick....

    Please Login or Register  to view this content.
    Not really sure how i managed that!!

+ Reply to Thread

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