Results 1 to 2 of 2

Thread: Random numbers

Hybrid View

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2001
    Location
    Pittsburgh, PA
    Posts
    3

    Random numbers

    I know I should know this, but how do you go about generating a random number between, for example, intHighest and intLowest? I know about the random function and the Randomize function for seeds, I just forget the syntax here.


    Thanks guys

    Steve Gazzo
    "Hack for fun, program for profit."

  2. #2
    Fanatic Member Kaverin's Avatar
    Join Date
    Oct 2000
    Posts
    930
    VB Code:
    1. randomnumber = Int(Rnd * (intHighest - intLowest + 1)) + intLowest
    I'm baaaack...
    VB5 Professional Edition, VC++ 6
    Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se

    I feel special because I finally figured out how to loop midis: Post link
    I'm a fanatic too

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