Hallo , ich möchte einen Passwor-Generatoren mal zum spaß amchen, da hab ich folgenden Code:
Code
Private Sub Command1_Click()
Text1 = GenerateCode()
End Sub
Public Function GenerateCode()
strInputString = "1234567890abcdefghijklmnopqrstuvwxyz"
intLength = Len(strInputString)
If Option1.Value = True Then
intNameLength = 6
ElseIf Option2.Value = True Then
intNameLength = 7
ElseIf Option3.Value = True Then
intNameLength = 8
ElseIf Option4.Value = True Then
intNameLength = 9
End If
Randomize
strName = ""
For intStep = 1 To intNameLength
intRnd = Int((intLength * Rnd) + 1)
strName = strName & Mid(strInputString, intRnd, 1)
Next
GenerateCode = strName
End Function
Alles anzeigen
Aber der Funzt irgentwie net ganz!'
Er sol 6 stellige 7 stellige 8 stellige und 9 stellige generieren!