0/5 SUPER EASY
Right, Well this is my 1st proper coded by me tutorial.
Adding The generator to New account
Go to FrmNewAccount
add a a label and a text box below password
and then call the label lblGen and call the textbox txtGen
-------------------
Example
Password| :______:<-----text box
Generate| :______:
-------------------
Right now right click and add this code to the label
Code:
Private Sub lblGen_Click()
txtGen = GenerateCode()
End Sub
now you can place this next part of the code anywhere I think, I placed it below Sub CheckMovement()
add the code below Sub CheckMovement()
Code:
Public Function GenerateCode()
Dim strinputstring As String
Dim intLength As String
Dim IntNameLength As Long
Dim strname As String
Dim Intstep As Integer
Dim intRnd As Integer
strinputstring = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
intLength = Len(strinputstring)
IntNameLength = 5
strname = ""
For Intstep = 1 To IntNameLength
intRnd = Int((intLength * Rnd) + 1)
strname = strname & Mid(strinputstring, intRnd, 1)
Next
GenerateCode = strname
End Function
You can also add numbers to it, add 0123456789 to here strinputstring = "
so it would be strinputstring = " 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
You can also put the code under lblConnect_click() in the Forms code for FrmNewAccount
and then change the Public function to Private function
Any questions let me know
~Jack =)
Version used MS3