[php]Private Function randompw(ByVal chars As String, ByVal length As Integer)
Dim r, i
Dim x As String = ""
For i = 1 To length
Randomize()
r = Int((Rnd() * 61) + 1)
x = x & Mid(chars, r, 1)
Next i
Return (x)
End Function[/php]
[php] Private Const chars As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvw xyz1234567890 09876543210!§$%&/()=?ß}][{²³"
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
msgbox(randompw(chars, 10))
End Sub
[/php]