Results 1 to 19 of 19

Thread: No recurrence random words [resolved]

Threaded View

  1. #1

    Thread Starter
    Addicted Member *PsyKE1*'s Avatar
    Join Date
    Jun 2010
    Location
    Spain
    Posts
    243

    Resolved No recurrence random words [resolved]

    Hi! to see if I you help me, the question is:
    I have this to generate random words:
    But i want those words can not be repeated ... and that's it, so simple ...
    (Do not be scared it was dirty )
    Code:
    Private Sub Aleatory_Comb(ByRef CharList() As String, ByVal iDigits As Integer, ByVal iNumber As Long)
        Dim sWord As String
        Dim x     As Long
        Dim y     As Long
        For y = 1 To iNumber
            For x = 1 To iDigits
                Randomize
                sWord = sWord + CharList((Rnd * (UBound(CharList()) - 1) + 1))
            Next
            MsgBox sWord: sWord = ""
        Next
    End Sub
    
    Private Sub Form_Load()
        Dim Matriz() As String
        Matriz = Split("a,b,c,d,e,f,g,h,i,j,k,l,,m,ñ,o,p,q,r,s,t,u,v,w,x,y,z", ",")
        Call Aleatory_Comb(Matriz, 5, 7)
    End Sub
    Thanks!!
    Last edited by *PsyKE1*; Jun 16th, 2010 at 02:38 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width