VBA Newbie here...I am trying to write a code under the workbook so when a sheet opens it is unprotected to "admin" users...the kicker is I want it set up based on my second sheet "AuthUsers" in column A where the admins are allowed to edit/add new users. (usernames are system not excel). I was trying to mimic this code I used for the read only code but have no luck. I have been trying different things in the module and running it from there to see if it will unprotect with my username filled in but no luck. I will post the base read only code and then what I have tried to do with it. Any help would be awesome!

'This sets all users to read only unless you are listed in AuthUsers sheet column A
    Users = Environ("USERNAME")
    Set C = Worksheets("AuthUsers").Range("A1:A100").Find(Users, LookIn:=xlValues, lookat:=xlWhole, MatchCase:=False)
    If C Is Nothing Then
        Application.DisplayAlerts = False
        On Error Resume Next
       'may already be read only
        If ThisWorkbook.Path <> vbNullString Then ThisWorkbook.ChangeFileAccess xlReadOnly
        On Error GoTo 0
        Application.DisplayAlerts = True
    End If
Users = Environ("USERNAME")
Set C = Worksheets("AuthUsers").Range("A3").Find(Users, LookIn:=xlValues, lookat:=xlWhole, MatchCase:=False)
    If C Is Nothing Then
        Application.DisplayAlerts = False
        On Error Resume Next
       'may already be read only
        If C = Environ("USERNAME") Then Sheets("EDP #s").Unprotect (Pass)
        On Error GoTo 0
        Application.DisplayAlerts = True
    End If