Results 1 to 6 of 6

Thread: how do you make a certain task random

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2006
    Posts
    2

    how do you make a certain task random

    I am in a computer proggraming class and we are sadly using vb 6. For extra credit I created a "who will win" superbowl program and I need a code to make a random vote for either team. If you know this code plz post thank you

  2. #2
    Fanatic Member lerroux's Avatar
    Join Date
    Nov 2005
    Location
    Welcome to the darkside... we have cookies
    Posts
    646

    Re: how do you make a certain task random

    dont you have any ideas on how to make this code for yourself?

    i'd like to quote someone on this matter, he once posted
    Two, we don't write apps for people, even if they aren't hard to do. If we do the work for you, would you learn anything?

    Fourth, after you try to get something working, and run across a problem, post the code, the error, and the error line. Someone will try to help you resolve it.
    WARNING: Excessive coding is dangerous to your health... if symptoms persist insult your doctor...

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2006
    Posts
    2

    Re: how do you make a certain task random

    wow okay that was totally pointless if i see it and copy it then i will remember it.

  4. #4
    Frenzied Member d3gerald's Avatar
    Join Date
    Jan 2006
    Posts
    1,348

    Re: how do you make a certain task random

    as what lerroux had said, we don't create app for others, we just help them if they encountered problems with their codes,

    but i'l give you a hint, to generate random numbers, use the rnd command

    create it, dont ask for it, and when you have some problems with your code, ask for help and i'm sure vbforums members will be more than glad to give you their ideas to help you do it

    okay
    On error goto Trap

    Trap:
    in case of emergency, drop the case...

    ****************************************
    If this post has been resolved. Please mark it as "Resolved" by going through the "Thread Tools" above and clicking on the "Mark Thread Resolved " option.
    if a post is helpful to you, Please Rate it by clicking on the Rate link right below the avatar

  5. #5
    Fanatic Member lerroux's Avatar
    Join Date
    Nov 2005
    Location
    Welcome to the darkside... we have cookies
    Posts
    646

    Re: how do you make a certain task random

    now that would totally help...i'm sorry but we really dont make codes... we just help make the codes
    WARNING: Excessive coding is dangerous to your health... if symptoms persist insult your doctor...

  6. #6
    Member
    Join Date
    Jan 2006
    Location
    J'burg South Africa
    Posts
    34

    Re: how do you make a certain task random

    Have a look in MSDN for the 'Randomise statement' and the 'Rnd Function' and play with the results.

    You have to start somewhere.

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