+ Reply to Thread
Results 1 to 7 of 7

different password to unhide the hidden sheets.

Hybrid View

  1. #1
    Valued Forum Contributor Rahul Nagar's Avatar
    Join Date
    09-18-2008
    Location
    nasik
    MS-Off Ver
    Excel 2003
    Posts
    465

    different password to unhide the hidden sheets.

    hello,

    I have 5 sheets, 3 of them are hidden, how can i put a 3 different password to unhide the hidden sheets.

    regards
    rahul
    Last edited by Rahul Nagar; 11-25-2008 at 10:30 AM.

  2. #2
    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
    Just set a different password for the sheets!, when protecting sheets you can have a different password for each sheet.
    Not all forums are the same - seek and you shall find

  3. #3
    Valued Forum Contributor Rahul Nagar's Avatar
    Join Date
    09-18-2008
    Location
    nasik
    MS-Off Ver
    Excel 2003
    Posts
    465
    Quote Originally Posted by Simon Lloyd View Post
    Just set a different password for the sheets!, when protecting sheets you can have a different password for each sheet.
    Hi thanks for the quick reply,

    I want to know the procedure for encrypting the particular sheet for different user.
    __________________
    Regards
    Rahul Nagar
    Founder of www.myshortcutkeys.com.


    If you get the answer of your questions then please click EDIT in your original post then click on GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody! ....
    Also
    If you are satisfied by any members response to your problem please consider using the scales icon top right of thier post to show your appreciation.

  4. #4
    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
    Encrypting? you're talking a lot of work!, it would be much easier to hide sheets base don the user accessing:
     
    Dim Sh as worksheet
    If environ("username") = "Fred" then
    sheets("Sheet2").Visible=True
    for each sh in sheets
    if sh.name<> "Sheet2" then
    sh.visible=xlsheetveryhidden
    end if
    next sh

  5. #5
    Valued Forum Contributor Rahul Nagar's Avatar
    Join Date
    09-18-2008
    Location
    nasik
    MS-Off Ver
    Excel 2003
    Posts
    465
    Thanks once again for providing us the proper solution,

    Can you please explain me the complete steps to hide this sheets, I am unable to understand where should we use this code. Is it a VB code?

    Sorry for confusing you but I am unable to get proper solution that's the reason I am asking you this question?

  6. #6
    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
    It is VBA code and goes in the VBE in the ThisWorkbook module (Alt+F11), paste this in and add more cases as needed:

    Private Sub Workbook_BeforeClose(Cancel As Boolean)
    Dim Sh As Worksheet
    For Each Sh In Sheets
    Sh.Visible = True
    Next Sh
    End Sub
    Private Sub Workbook_Open()
    Dim Sh As Worksheet
    Select Case Environ("username")
    Case Is = "Fred"
    Sheets("Sheet1").Visible = True
    Sheets("Sheet1").Select
    Case Is = "John"
    Sheets("Sheet2").Visible = True
    Sheets("Sheet2").Select
    Case Is = "Simon"
    Sheets("Sheet3").Visible = True
    Sheets("Sheet3").Select
    End Select
    For Each Sh In Sheets
    If Sh.Name <> ActiveSheet.Name Then
    Sh.Visible = xlSheetVeryHidden
    End If
    Next Sh
    End Sub

+ 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