robertborchardt
Programmer
I have two text boxes (passwordLength and pwd)and a button1. I have placed the code in the source <script> and I have used a button1 click sub but I cannot get the data to show up on the pwd text field. The code is below. What am I missing?
Public Sub Button1_Click((ByVal passwordLength As Integer) Handles Button1.Click
Dim passwordLength As Integer
Dim pwd As String
Dim permittedChars As String
permittedChars = "abcdefghjklmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ0123456789"
pwd = ""
For i = 1 To passwordLength
pwd = pwd & Mid(permittedChars, Int(Rnd() * Len(permittedChars) + 1), 1)
Next i
End Sub
Public Sub Button1_Click((ByVal passwordLength As Integer) Handles Button1.Click
Dim passwordLength As Integer
Dim pwd As String
Dim permittedChars As String
permittedChars = "abcdefghjklmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ0123456789"
pwd = ""
For i = 1 To passwordLength
pwd = pwd & Mid(permittedChars, Int(Rnd() * Len(permittedChars) + 1), 1)
Next i
End Sub