Random Password Generator

G

Guest

I am looking for a random generator that will give me anywhere between 6 to
12 characters (alphanumeric) that we can use as temp passwords. Can someone
give me direction as to what the code would be or where to find it. Please
email me at (e-mail address removed)
 
G

Guest

Public Function RandomPass()

s = ""
For i = 1 To Int(Rnd() * 6 + 6)
If Rnd() < 0.3 Then
s = s & Chr(Int(Rnd() * 26 + 65))
ElseIf Rnd() < 0.5 Then
s = s & Chr(Int(Rnd() * 26 + 97))
ElseIf Rnd() < 0.75 Then
s = s & CStr(Int(Rnd() * 10 + 1))
Else
s = s & Choose(Int(Rnd() * 10 + 1), "!", "#", _
"$", "%", "^", "*", "(", ")", ">", "<")
End If
Next
RandomPass = s
End Function


? randompass()
TusX10%u9c
2ifP75
muSH3DhZzP4
8uleI109
qJmpafP
cNAwe4
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top