Hi
Say you have a list of the user logon ids in sheet1 column A, the passwords in column B and the sheet they can access in column C, then try
getpass = InputBox("Enter password")
If getpass = WorksheetFunction.VLookup(Environ("username"), Sheets("sheet1").Range("A:B"), 2, False) Then
MsgBox "User can get to: " & WorksheetFunction.VLookup(Environ("username"), Sheets("sheet1").Range("A:C"), 3, False)
Else
MsgBox "invalid password"
End If
You can expand the code to open the relevant sheet etc.
rylo
Bookmarks