ms excel sheet wise permission

isurunalaka

Active member
  • Oct 31, 2008
    810
    27
    28
    excel workbook ekaka worksheet walata userslata wenawenama permission denna widihak thynawada?

    i.e - sheet1 can only be accessed by user1 and sheet2 can only be accessed by user2 etc...
     

    asknrk

    Well-known member
  • Feb 10, 2007
    2,843
    791
    113
    @Thusithaya
    excel workbook ekaka worksheet walata userslata wenawenama permission denna widihak thynawada?

    i.e - sheet1 can only be accessed by user1 and sheet2 can only be accessed by user2 etc...

    Private Sub Workbook_SheetActivate(ByVal Sh As Object)

    Dim Msg As String
    Dim UserEntry As Variant

    Msg = InputBox("What is the password?")

    Do
    Sheet1.Activate
    UserEntry = InputBox(Msg)

    If UserEntry = "test" Then Exit Sub
    If UserEntry = False Then
    Msg = "Invalid Password!"
    Msg = Msg & vbNewLine
    Msg = Msg & "What is the password?"

    Loop
    Sheet1.Activate = UserEntry

    End Sub



    source:http://stackoverflow.com/questions/8145215/individual-worksheet-passwords
     

    isurunalaka

    Active member
  • Oct 31, 2008
    810
    27
    28