How to make a Password Generator
Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
9 posts
Page 1 of 1
Hello and Welcome to my first Tutorial
First I'm apologize for my bad English an now we beginning with my first tutorial:
We make in my first tutorial a Password Generator with 2 functions the first Function is a password generation with no special character the 2'nd with special character.
First we make a new Project i named it Password Generator
Now we make a Form with this Tools
1 Textbox
1 Button
1 Checkbox
Now we coming to the code. To make the Password we make two Functions the first Functions is the code without special character the 2'nd with special character.
First Functions
Here the special characters code in one:
Now this was my first Tutorial here i hope you like this Tutorial please give me Feedback!
First I'm apologize for my bad English an now we beginning with my first tutorial:
We make in my first tutorial a Password Generator with 2 functions the first Function is a password generation with no special character the 2'nd with special character.
First we make a new Project i named it Password Generator
Now we make a Form with this Tools
1 Textbox
1 Button
1 Checkbox
Now we coming to the code. To make the Password we make two Functions the first Functions is the code without special character the 2'nd with special character.
First Functions
Code: Select all
Now come the Functions with special characters but you can copy the first code but you write some more characters herePublic Function GenerateCode() As Object
Dim intRnd As Object
Dim intStep As Object
Dim strName As Object
Dim intNameLength As Object
Dim intLenght As Object
Dim strInputString As Object
strInputString = "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
intLenght = Len(strInputString)
intNameLength = 10
Randomize()
strName = ""
For intStep = 1 To intNameLength
intRnd = Int((intLenght * Rnd()) + 1)
strName = strName & Mid(strInputString, intRnd, 1)
Next
GenerateCode = strName
End Function
Code: Select all
This is the code without special characters here are the code with: strInputString = "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
Code: Select all
You can make very more.... strInputString = "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"§$%&/()=?`-_.,;<>|°^"
Here the special characters code in one:
Code: Select all
Now we have to Functions and now we can make a If queryPublic Function GenerateCodeSonder() As Object
Dim intRnd As Object
Dim intStep As Object
Dim strName As Object
Dim intNameLength As Object
Dim intLenght As Object
Dim strInputString As Object
strInputString = "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ§$%&/()=?"
intLenght = Len(strInputString)
intNameLength = 10
Randomize()
strName = ""
For intStep = 1 To intNameLength
intRnd = Int((intLenght * Rnd()) + 1)
strName = strName & Mid(strInputString, intRnd, 1)
Next
GenerateCodeSonder = strName
End Function
Code: Select all
If Checkbox1.Checked Then
Textbox1.Text = GenerateCodeSonder()
Else
Textbox1.Text = GenerateCode()
End if
Now this was my first Tutorial here i hope you like this Tutorial please give me Feedback!
Last edited by splitedchill on Mon Sep 05, 2011 9:29 pm, edited 1 time in total.
You cant put an object as a string propertys index value. You should use = to set the value.
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;
Over 30 projects with source code!
Please give reputation to helpful members!
![Image]()
![Image]()
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;
Over 30 projects with source code!
Please give reputation to helpful members!

mandai wrote:This code is valid and it will work as it is.I cant remember when it became possible to use Textbox1.Text(Something) to set a.textboxs text
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;
Over 30 projects with source code!
Please give reputation to helpful members!
![Image]()
![Image]()
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;
Over 30 projects with source code!
Please give reputation to helpful members!

Right, that would be an incorrect usage example.
This would work:
This would work:
Code: Select all
If Checkbox1.Checked Then
Textbox1.Text = GenerateCodeSonder()
Else
Textbox1.Text = GenerateCode()
End if
mandai wrote:Right, that would be an incorrect usage example.
This would work:Code: Select allIf Checkbox1.Checked Then Textbox1.Text = GenerateCodeSonder() Else Textbox1.Text = GenerateCode() End if
Thanks for your correction!
I have change it!
Good job my friend, I put it in my apps it works. cooll;
9 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023