VB Code:
  1. Private Sub Command1_Click()
  2.     Randomize Timer
  3.     Msgbox Int((Rnd * 10) + 1)
  4. End Sub