+ Reply to Thread
Results 1 to 9 of 9

All sheet: read-only protection

  1. #1
    Registered User
    Join Date
    02-23-2011
    Location
    Hampshire, England
    MS-Off Ver
    Excel 2007
    Posts
    71

    Exclamation All sheet: read-only protection

    Hello,

    I have gone through the various password protection methods but I can't get the workbook to do what I want.

    I want to make sure every tab is read-only and any accidental modification requires a password.

    "Protect sheet" protects the current sheet and I don't want to use a separate password for every tab. "Protect workbook" requires a password before it is opened.

    Any ideas?

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: All sheet: read-only protection

    You have to protect the sheet individually. You can automate this with a macro
    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 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: All sheet: read-only protection

    Something like this:

    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
    Registered User
    Join Date
    02-23-2011
    Location
    Hampshire, England
    MS-Off Ver
    Excel 2007
    Posts
    71

    Re: All sheet: read-only protection

    Clever but the slight drawback is that there is no way to know if the password can be checked when unprotecting the worksheet so I am storing the string on a spreadsheet using the protect code and then I want to compare the string in the unprotect code.

    For some reason my If statement isn't working.

    Please Login or Register  to view this content.
    Last edited by scubadiver007; 11-01-2011 at 12:25 PM. Reason: Clarification

  5. #5
    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: All sheet: read-only protection

    Sorry, don't follow what you mean.

    Dom

  6. #6
    Registered User
    Join Date
    02-23-2011
    Location
    Hampshire, England
    MS-Off Ver
    Excel 2007
    Posts
    71

    Re: All sheet: read-only protection

    I have created a password using the protect code but I have tried a completely different string of characters to unprotect the sheets and it works.

  7. #7
    Registered User
    Join Date
    02-23-2011
    Location
    Hampshire, England
    MS-Off Ver
    Excel 2007
    Posts
    71

    Re: All sheet: read-only protection

    Sorry, might be my mistake. I'm not using an input box.

    EDIT: its fine now, thanks.
    Last edited by scubadiver007; 11-01-2011 at 12:33 PM.

  8. #8
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: All sheet: read-only protection

    Where does your code actually set a value to strPWord?

  9. #9
    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: All sheet: read-only protection

    Are you sure? If the sheets were protected with a password after you ran the Protect_Sheets code there's no way the other code would unprotect them without the correct password even with Excel 2003's slack security.

    Dom

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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