Save random value to Single data type variable : Single « Data Type « VBA / Excel / Access / Word






Save random value to Single data type variable

 
  Sub Lottery_1()
      Dim sngWin As Single
      Do Until sngWin > 2000
          sngWin = Rnd * 2100
          Debug.Print sngWin, , "Lottery"
      Loop
  End Sub

 








Related examples in the same category

1.Display in a message box the number of seconds passed since midnight.
2.Do Until... Loop Loops with Single value