+ Reply to Thread
Results 1 to 8 of 8

password protect sheet

  1. #1
    Registered User
    Join Date
    07-12-2005
    Posts
    21

    password protect sheet

    Hi All,

    Can anyone tell me if there is a way to protect a worksheet from being viewed.

    I need the workbook to be accessed but one particular sheet is quite sensitive and i would like it to be password protected.

    Can anyone help

    Cheers

    Phil

  2. #2
    Registered User
    Join Date
    08-09-2005
    Posts
    42

    Hide your worksheet

    hi

    I am not sure if you can protect your sheet with password.
    Probably yes, but I thing that you will need to programm some macro for it.

    But what you can do is hide your sheet.

    There are two types of hiding a sheet.

    1. (very easy and probably everyone knows) Format ---> Sheet---> Hide
    2. (also very easy but a little bit better:-)) go to VBA editor (alt+F11), select your sheet and in properties window choose option "xlSheetVeryHidden" .

    but maybe someone helps you better :-)

    tommy

  3. #3
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264
    Hi Phil

    But, be warned - all password protection in Excel can be bypassed by somebody with knowledge.

    the only safe way to ensure that sensitive information is not compromised is to use paste special into a copy and then only copy values and not formulae and/or leave out the sensitive page.

    Ed

  4. #4
    Registered User
    Join Date
    07-12-2005
    Posts
    21

    Another way ??

    Thanks for your answers so far, but hiding it wont work as the person who needs access wont be able to find it.

    Is there a way to run a macro on opening the sheet

    I figure that i could that the macro could turn the text white and prompt the user to enter a password. If this is incorrect the macro would change the sheet back, and if the password is right it will change the text back to black and end

    What do you reckon ?

    Phil

  5. #5
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264
    Hi Phil,

    But, if the user selects a cell he will be able to see the contents in the formula bar even if the text is white.......

    Perhaps if you outline the scenarios more precisely of who views and what they are allowed to see, someone might be able to come up with a solution.


    Ed

  6. #6
    Registered User
    Join Date
    07-12-2005
    Posts
    21

    Solution - Kind of

    Once again, thanks for all you help.
    to Ellaborate all users are not computer hacks or nosy people, and it is not imperative that the information remains hidden although it would be nice.I have cobbled a simple macro to kind of do it

    Private Sub Worksheet_Activate()
    Cells.Select
    Selection.Font.ColorIndex = 2
    Range("A1").Select
    PWORD = InputBox("Password required to edit sheet" & Chr$(10) & Chr$(13) & "Please enter Password", "PASSWORD REQUIRED")
    MsgBox (PWORD)
    If PWORD <> "Password" Then
    MsgBox ("Sorry...Password is incorrect")
    Sheets("sheet1").Select
    Else
    Range("a1").Select
    Cells.Select
    Selection.Font.ColorIndex = 1
    Range("A1").Select
    End If
    End Sub

    i have then password protected the macro from viewing.

    It kinda works.

    Thanks

    Phil

  7. #7
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    The simplest solution is to Hide the sheet from the dropdown menu (no need for macros) and then protect the WORKBOOK. This prevents the users from unhiding sheets, and adding, copying or moving worksheets within the workbook. It does not affect data input into the visible sheets.

    ChemistB

  8. #8
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161
    Have the sheet xlVeryHidden and use a coomand button to prompt for a password to unhide it....best way!
    Not all forums are the same - seek and you shall find

+ 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