Hello I have a vba code below which works for one user but i want to add 3 more user, I couldnt make it . I appreciate your help
Sub auto_open()
Dim a As Worksheet
If Environ("UserName") <> "User1" Then
For Each a In Sheets
If a.Name = "Sheet1" Or a.Name = "Sheet2" Then
Else
a.Visible = xlSheetHidden
End If
Next a
ThisWorkbook.Protect "password", True, False
End If
End Sub
Bookmarks