[Question] Pass generator

Posts 1–10 of 10 · Page 1 of 1
[Question] Pass generator
I'm currently in the process of churning out a Password generator. I can get it to work perfectly, I just want to know how you can take out/add a character to the process.
Quote Originally Posted by Nexulous View Post
I'm currently in the process of churning out a Password generator. I can get it to work perfectly, I just want to know how you can take out/add a character to the process.
For adding a letter/word (Only adding at the end)

Code:
TextBox1.Text = TextBox1.Text + "other word"
I'm not sure about deleting...
Code:
Function GenString(ByRef length As Integer) As String
Randomize()
Dim allowableChars As String
allowableChars = "abcdefghijklmnopqrstuvwxyz0123456789" ' Remove or add chars you want
Dim i As Integer
For i = 1 To length
GenString = GenString & Mid$(allowableChars, Int(Rnd() * Len(allowableChars) + 1), 1)
        Next
    End Function
How to use example
textbox1.text = GenString(6) '6 stands for the amount of chars generated.
Well for adding a character its
Code:
Textbox1.text = Textbox1.text +"Character here"
For removing you could try
Code:
Textbox1.text = Textbox1.text - "Character here"
Not sure if the removing one would work but its worth a shot
Thanks, you VB nerds. Will be very helpful. I will give credits to whomever's code I use.
Songipark? o.O Since when do you do vb? D:
Since now. Whut, like fight?
I added your msn btw. D:
Kay. I gotchuuuuuuuu
Stop the spam

Looks like the problem is solved.

/Closed
Posts 1–10 of 10 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us