Dim x As Integer Dim i As Integer Dim nchar() As String For x = 0 To 127 'ASCII-Code Select Case x Case 48 To 57...
Redim Preserve nchar(i) nchar(i) = Chr$(x) i = i + 1 Case 97 To 122 Redim Preserve nchar(i) nchar(i) = Chr$(x) i = i + 1 End Select Next
For j = 1 To 8 'generate the password
pw = pw + nchar(Rnd(x)*i)
'Display the password in a password field