Random Password Generator

Discussion in 'Programming General' started by Waffles, Dec 1, 2007.

Random Password Generator
  1. Unread #1 - Dec 1, 2007 at 10:34 AM
  2. Waffles
    Referrals:
    4

    Waffles Guest

    Random Password Generator

    Create a TextBox(text1)
    Then create a CommandButton(command1)
    Then insert this code:

    Code:
    'Property of Waffles
    'www.sythe.org
    
    Private Sub Command1_Click()
       Text1 = GenerateCode() 'make sure ur textbox is called Text1
    End Sub
    
    Public Function GenerateCode()
       strInputString = "1234567890abcdefghijklmnopqrstuvwxyz" 'these are the characters which will be in the password
       
       intLength = Len(strInputString)
       
       intNameLength = 7 'edit this according to how long u want ur password to be
       
       Randomize ' jus to make it random :D
       
       strName = ""
       
       For intStep = 1 To intNameLength
    	   intRnd = Int((intLength * Rnd) + 1)
       
    	   strName = strName & Mid(strInputString, intRnd, 1)
       Next
       
       GenerateCode = strName
    End Function
     
  3. Unread #2 - Dec 1, 2007 at 7:11 PM
  4. UmagChris
    Joined:
    Mar 13, 2007
    Posts:
    135
    Referrals:
    0
    Sythe Gold:
    0

    UmagChris Active Member

    Random Password Generator

< Clock | MSN bot (Beta) >

Users viewing this thread
1 guest


 
 
Adblock breaks this site