I have some macros that have to be ran by an internal team. The managers of that team are the macro testers. And everybody else on the team is just a user. However, everyone in the company has access to the form.
What I need is a code that can distinguish between the two like I have included below: (THIS WORKS)
Whenever we get a new team member on the team or one quits we have to manually go through and insert their user name on their macros on their computer to give them access... Is there a way I can transform this code to check the users against an external list on a sharedrive, see what permissions the user has, and allow them to advance as permitted? The end goal being that it works the same, however I can manage the list of users externally?
What I need is a code that can distinguish between the two like I have included below: (THIS WORKS)
VBA Code:
Function IdentifyUser()
UN = Application.UserName
If UN = "McKinney, David A" Or UN = "Jingle, John C [US] (MS)" Or UN = "Jacobs, John [US] (SP)" Then '<-- Operators and/or Testers
Condition = "Operational"
OpOrT = MsgBox("Are you performing a Test on the Macro?", vbYesNo, "Test or Operational")
Select Case OpOrT
Case vbYes
Condition = "Test"
Case vbNo
Condition = "Operational"
End Select
ElseIf UN = "Jasper, Jennifer [US] (MS)" Or UN = "Jingle, Jerome [US] (SP)" Then
Condition = "Operational"
Else
Condition = "Unknown" '<-- Non-Department Users
End If
End Function
Whenever we get a new team member on the team or one quits we have to manually go through and insert their user name on their macros on their computer to give them access... Is there a way I can transform this code to check the users against an external list on a sharedrive, see what permissions the user has, and allow them to advance as permitted? The end goal being that it works the same, however I can manage the list of users externally?