I have a very simple code that checks if the user exists and returns a "Guaranteed Access" or "Access Denied" message.
The problem is that I need to call this Sub 5 times, which will return 5 MsgBox . How could I return a unique MsgBox with the 5 information saying 'User Y does not exist ...'?
Dim UserName
Dim UserPass
Dim Mateus: Mateus = "Math"
Dim SenhaMateus: SenhaMateus ="123"
Dim Chris: Chris = "Chris99"
Dim SenhaChris: SenhaChris = "@#23"
Dim Samurai: Samurai = "Samuca"
Dim SenhaSamurai: SenhaSamurai = "CH1N4"
Dim Kaguya: Kaguya = "Kaguy"
Dim SenhaKaguya: SenhaKaguya = "Naruto"
Dim Maroto: Maroto = "Marotinho"
Dim SenhaMaroto: SenhaMaroto = "78D99D"
Dim Jorge: Jorge = "Jorge"
Dim SenhaJorge: SenhaJorge = "Benjor"
Call ChecaUser(Mateus,SenhaMateus)
Call ChecaUser(Chris,SenhaChris)
Call ChecaUser(Samurai,SenhaSamurai)
Call ChecaUser(Kaguya,SenhaKaguya)
Call ChecaUser(Maroto,SenhaMaroto)
Call ChecaUser(Jorge,SenhaJorge)
Sub ChecaUser(UserName,UserPass)
if (UserName = "Jorge" and UserPass = "Benjor") then
MsgBox "Acesso Garantido"
Else
MsgBox "Usuario não existe"
End if
End Sub