Results 1 to 9 of 9

Thread: help radom

  1. #1

    Thread Starter
    Banned
    Join Date
    Mar 2008
    Posts
    24

    help radom

    how can i make random with word..
    like
    but i need somethings in end
    @angel
    i wana @angel in end text box
    so how can i do like tht
    here for explln

    random 6 word
    ahshsd@angel
    paushf@angel
    siuesoj@angel
    ahosps@angel

  2. #2
    Addicted Member
    Join Date
    May 2007
    Location
    Belgium
    Posts
    156

    Re: help radom

    text1.text = text1.text & "@angel"

  3. #3
    Head Hunted anhn's Avatar
    Join Date
    Aug 2007
    Location
    Australia
    Posts
    3,669

    Re: help radom

    Code:
    Dim sEmail(1 to 10) as String
    Dim i as Integer, n as Integer, k as Integer
    
    Randomize 
    For i = 1 to 10
       For k = 1 to 6
          n = Int(Rnd * 26) + 97 '-- 26 letters from "a" with asc=97 to "z" with asc=122
          sEmail(i) = sEmail(i) & Chr$(n)
       Next
       sEmail(i) = sEmail(i) & "@angel"
       Debug.Print sEmail(i)
       '-- No checking duplicate here. A collection can be used to store emails addresses
    Next
    Last edited by anhn; May 1st, 2008 at 07:21 PM.
    • Don't forget to use [CODE]your code here[/CODE] when posting code
    • If your question was answered please use Thread Tools to mark your thread [RESOLVED]
    • Don't forget to RATE helpful posts

    • Baby Steps a guided tour
    • IsDigits() and IsNumber() functions • Wichmann-Hill Random() function • >> and << functions for VB • CopyFileByChunk

  4. #4

    Thread Starter
    Banned
    Join Date
    Mar 2008
    Posts
    24

    Re: help radom

    Quote Originally Posted by anhn
    Code:
    Dim sEmail(1 to 10) as String
    Dim i as Integer, n as Integer, k as Integer
    
    Randomize 
    For i = 1 to 10
       For k = 1 to 6
          n = Int(Rnd * 26) + 97 '-- 26 letters from "a" with asc=97 to "z" with asc=122
          sEmail(i) = sEmail(i) & Chr$(n)
       Next
       sEmail(i) = sEmail(i) & "@angel"
       Debug.Print sEmail(i)
       '-- No checking duplicate here. A collection can be used to store emails addresses
    Next

    its working thanks
    can u tell me how can i send it in text1.text
    i mean its showin in text1.text box?

  5. #5
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: help radom

    Quote Originally Posted by angel.girl
    can u tell me how can i send it in text1.text
    i mean its showin in text1.text box?
    I don't understand what you are asking here.

    If it is showing in Text1, then it is already there so there wouldn't be any need to send it.

  6. #6

    Thread Starter
    Banned
    Join Date
    Mar 2008
    Posts
    24

    Re: help radom

    look he post random code its working
    when i click on button
    but i wana its show in text box
    when i click on the button its send show in text1.text
    i got no idea how can i..

  7. #7
    Head Hunted anhn's Avatar
    Join Date
    Aug 2007
    Location
    Australia
    Posts
    3,669

    Re: help radom

    If you want to get help, please post here. Do not send PM.
    Code:
    Private Sub Form_Load()
       Randomize 
    End Sub
    
    Private Sub Command1_Click()
       Dim sEmail as String
       Dim n as Integer, k as Integer
    
       For k = 1 to 6
          n = Int(Rnd * 26) + 97 '-- 26 letters from "a" with asc=97 to "z" with asc=122
          sEmail = sEmail & Chr$(n)
       Next
       sEmail = sEmail & "@noangel"
       Text1.Text = sEmail
    End Sub
    Last edited by anhn; May 2nd, 2008 at 08:10 AM.
    • Don't forget to use [CODE]your code here[/CODE] when posting code
    • If your question was answered please use Thread Tools to mark your thread [RESOLVED]
    • Don't forget to RATE helpful posts

    • Baby Steps a guided tour
    • IsDigits() and IsNumber() functions • Wichmann-Hill Random() function • >> and << functions for VB • CopyFileByChunk

  8. #8

    Thread Starter
    Banned
    Join Date
    Mar 2008
    Posts
    24

    Re: help radom

    its send to text1.text but when i click on the button show like tht

    if u click on time its showin more random caz i wana jus one

    qkzctw@angel, nbnsmq@angel, oqbgev@angel, pmatvb@angel, qydrpg@angel, dgldmp@angel, kizdxt@angel, ytsqsi@angel, wzlzkb@angel, jbxkwb@angel

    see here i click 1 time and its showin 10
    how can do it like click on time button
    and
    one
    hahiss@angel
    click agian
    hahies@angel
    here is randsom projct but wid out angel:8

    http://www.2shared.com/file/3233162/...12/random.html

  9. #9

    Thread Starter
    Banned
    Join Date
    Mar 2008
    Posts
    24

    Re: help radom

    thanks i got its working

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