Shared Function Rand(ByVal lStart As Long, ByVal lEnd As Long) As Long Dim RandClass As New Random() Rand = RandClass.Next(lStart, lEnd) End Function