Hi
You can copy the code in 'This Workbook' Object.
Private Sub Workbook_Open()
Dim UserNames As String
ActiveWorkbook.Sheets("Sheet1").Unprotect Password:="***"
UserNames = Application.UserName
Select Case UserNames
Case "Saba Sabaratnam"
Case "wmtsub"
Case Else
ActiveWorkbook.Sheets("Sheet1").Protect Password:="***"
End Select
End Sub
When your workbook is opened, it will compare system user name with the names in Select Case and unprotect sheet 1 if it finds matching name. Otherwise, it will protect the sheet. You can include other names against.
You may want to protect the code by going Tool - VBA Project Properties - Protection on VBA editor and entering a password for the code. Otherwise, one user can change the code to include other names or change the worksheet password.
Kind regards
Saba