Results 1 to 3 of 3

Thread: Random Number is Same!

  1. #1
    Tenny
    Guest
    Everytime I open my little "Guessing Game" program it always starts out with the same here is the "start button code:

    Code:
    Private Sub Start_Click()
    display.Visible = False
    random.Visible = False
    random.Text = Int(Rnd * 100)
    display.Caption = ""
    guess1.Text = ""
    guess.Visible = True
    End Sub
    Anyone know of a way to make it change on the first time also?

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    Code:
    Private Sub Start_Click()
      
      Randomize Timer
    
      display.Visible = False
      random.Visible = False
      random.Text = Int(Rnd * 100)
      display.Caption = ""
      guess1.Text = ""
      guess.Visible = True
    End Sub
    ...should do the trick
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3
    Tenny
    Guest
    ah ha thank you!

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