Good morning
I have a userform that shows the current user logged in, That get displayed on a userform (the field is called "txt_user"). On that userfrom we have a button that validates the userid to see if its admin in that document.
In a tab called data we have a list of admin users. Now if that userid is in that list I need it to pass validation. Here is my code. It doesnt seem to want to work though, any ideas? Thank you Richard Baker.
I have a userform that shows the current user logged in, That get displayed on a userform (the field is called "txt_user"). On that userfrom we have a button that validates the userid to see if its admin in that document.
In a tab called data we have a list of admin users. Now if that userid is in that list I need it to pass validation. Here is my code. It doesnt seem to want to work though, any ideas? Thank you Richard Baker.
Code:
If Sheets("Data").Range("A1:A10").Find(txt_user.Value, LookIn:=xlValues) = True Then
MsgBox ("admin")
Else
MsgBox ("no admin")
End If