+ Reply to Thread
Results 1 to 3 of 3

How to make this code work even if the cells are locked and sheet is protected

  1. #1
    Forum Contributor
    Join Date
    05-19-2012
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    200

    How to make this code work even if the cells are locked and sheet is protected

    Hello!

    I have the following command that works fine, but it doesn't work when the worksheet is protected. Is there any way to make it work even when the sheet is "Protected"?

    Please Login or Register  to view this content.
    I'm new to coding. So please provide an ENTIRE NEW CODE that I can just copy and replace with the old, not just bits to add to it.

    Thanks!

  2. #2
    Valued Forum Contributor
    Join Date
    04-30-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    547

    Re: How to make this code work even if the cells are locked and sheet is protected

    If you protect the sheet with VBA, then use the UserInterfaceOnly setting, so macros can change the sheet without unprotecting.

    Please Login or Register  to view this content.
    Or, if you don't use code to protect the sheet, just unprotect it before the changes and then protect it again.

    Please Login or Register  to view this content.
    Change the references to reflect your setup.

  3. #3
    Forum Contributor
    Join Date
    05-19-2012
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    200

    Re: How to make this code work even if the cells are locked and sheet is protected

    This worked... thank you very much!!!

+ 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