Random number between given values - Vb.net

Random number

Snippet Code


  
Rate this page :
  [ 0 votes]

Generates a random number between given values.

Public Function RandomNumber(ByVal MaxValue As Long, Optional _ ByVal MinValue As Long = 0) On Error Resume Next Randomize Timer RandomNumber = Int((MaxValue - MinValue 1) * Rnd) MinValue End Function

Tags


Ask Questions

Ask Question