I have been try this over and over again but got the same output. I would like to make a loop in an array of strings but the code only visits the first value. This is my code I've tried:
name = Environ("username")
user1= Array("name.name1", "name.name2")
user2= Array("name1.name1", "name1.name2")
For i = 0 To Size ' I used Size coz I will add more names
If name = user1(i) Then
MsgBox "User1"
ElseIf name = user2(i) Then
MsgBox "User2"
Else
errorLog
End If
Next
Thank you in advance for your help!