+ Reply to Thread
Results 1 to 3 of 3

Turning WorkSheet Protection On

  1. #1
    Registered User
    Join Date
    02-18-2008
    Posts
    23

    Turning WorkSheet Protection On

    I am turning the protection on my worksheet off so I can modify cells, then turning it on again. However when I turn it back on, locked cells can sometimes be selected (but not updated).

    The code I am using is

    ActiveSheet.Protect Contents:=True

    Can anybody tell me what I am doing wrong?

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    Hi Jgupte,

    Try adding this line before your 'Protect Contents:=True' line:
    Please Login or Register  to view this content.
    Last edited by Paul; 06-05-2008 at 09:16 PM.

  3. #3
    Registered User
    Join Date
    02-18-2008
    Posts
    23

    Great !!!

    Seems to work.

    Many thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Worksheet protection
    By martins in forum Excel General
    Replies: 1
    Last Post: 05-28-2008, 12:34 PM
  2. Worksheet Protection when using VBA
    By Leah in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-24-2007, 10:46 AM
  3. validation list/ worksheet protection
    By peacenpotatoes in forum Excel General
    Replies: 1
    Last Post: 05-24-2007, 10:40 AM
  4. Help! Vba Copy Cell To Different Worksheet.
    By Dabooj in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-03-2006, 05:53 AM
  5. Macro worksheet protection policy
    By littleps in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-15-2006, 08:14 AM

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