home *** CD-ROM | disk | FTP | other *** search
- Private Sub Command1_Click()
- RegName = Text1.Text 'Put Text into "RegName"
- Variable
- RegLength = Len(RegName) 'Get length of name
- For c = 1 To RegLength 'Loop using length
- RegChar = Mid(RegName, c, 1) 'get one char at a time
- AscReg = Asc(RegChar) 'Asc of the char
- AscRegR2 = Right(AscReg, 2) 'Get the right 2 numbers
- RegCode = AscRegR2 & RegCode '"Join" the 2 numbers
- Next
- RegCode = Left(RegCode, 10) 'Get the first 10 numbers
- Text2.Text = RegCode 'Display serial number
- End Sub
-