+ Reply to Thread
Results 1 to 7 of 7

Can't unprotect the sheet

  1. #1
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Can't unprotect the sheet

    Hi

    I was using the wrong code for protecting a sheet:
    Please Login or Register  to view this content.
    Insted of
    Please Login or Register  to view this content.
    Now I can't unprotect the sheet with the password impro01 can anyone tell me what's the password or how can I find out?
    Last edited by stojko89; 11-22-2011 at 07:56 AM.

  2. #2
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: Can't unprotect the sheet

    try this
    Please Login or Register  to view this content.
    Regards, John55
    If you have issues with Code I've provided, I appreciate your feedback.
    In the event Code provided resolves your issue, please mark your Thread as SOLVED.
    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

    ...enjoy -funny parrots-

  3. #3
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Can't unprotect the sheet

    It will have populated the password as the boolean result of the test.

    You can therefore unprotect it using:

    Please Login or Register  to view this content.

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  4. #4
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: Can't unprotect the sheet

    LOL ! john55

    Tnx man. I did it like this the first time but then I just didn't think of that

    Fix my problem (lame problem - but it can happen I guess).

    Thank you very much !

  5. #5
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Can't unprotect the sheet

    Domski,

    Should it not be "Protect False" ?

  6. #6
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Can't unprotect the sheet

    Nope. The OP obviously doesn't use Option Explicit to enforce declaration of variables. In which case when protecting the worksheet it is evaluating Password = "impro01" with Password being a variable as False. Therefore to unprotect the sheet you can use False or the same test again as john55 pointed out.

    Dom

  7. #7
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Can't unprotect the sheet

    Thanks Domski,

    I obviously still have a lot to learn! Getting there slowly.

+ 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