Function GenerationLogin(X)
For i = 1 To 4
M = M & Chr(Int(Application.RandBetween(65, 90)))
M = M & Chr(Int(Application.RandBetween(97, 122)))
Next i
GenerationLogin = M
End Function
Function MDP(M)
For i = 1 To Len(M)
v = v + Asc(Mid(M, i, 1))
Next i
MDP = v
End Function
Function ControleMDP(M, N)
For i = 1 To Len(M)
v = v + Asc(Mid(M, i, 1))
Next i
If N = v Then ControleMDP = "OK" Else ControleMDP = "KO"
End Function