Results 1 to 3 of 3

Thread: How can I make vb select numbers from like 1 to 15?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 1999
    Location
    Lindenwold, NJ, USA
    Posts
    67

    Post

    How can I make vb select numbers from like 1 to 15? When I Put 1-15 it thinks I am Substracting

  2. #2
    Addicted Member
    Join Date
    Jan 1999
    Location
    Sydney,NSW,Australia
    Posts
    178

    Post

    I am not exactly sure what you want here. Do you want randomisation or selection of say items from a list based on the index????

  3. #3
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Post

    You don't really describe what you want to do, but the following will producr random numbers between 1 and 15.
    Code:
        Dim intRandom as Integer
        Randomize
        intRandom = Int((15 - 1 + 1) * Rnd + 1)

    ------------------
    Marty

    [This message has been edited by MartinLiss (edited 12-08-1999).]

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