Private Sub Command1_Click() Text1 = GenerateCode() End Sub Public Function GenerateCode() strInputString = "1234567890abcdefghijklmnopqrstuvwxyz" intLength = Len(strInputString) intNameLength = 15 Randomize strName = "" For intStep = 1 To intNameLength intRnd = Int((intLength * Rnd) + 1) strName = strName & Mid(strInputString, intRnd, 1) Next GenerateCode = strName End Function
I coded this a few years ago in vb6, iv been using vb.net and got used to it now and i cannt figure out how to code this into vb.net using visual basic 2008 express edition.
Iv tried recoding it but im getting so many errors, iv also tried a vb6 to vb.net converter which created a lot more errors.
This post has been edited by eraldo: 25 June 2009 - 09:36 AM

New Topic/Question
Reply




MultiQuote




|