View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jason Zischke Jason Zischke is offline
external usenet poster
 
Posts: 147
Default Random Number Generator

Hi

Try this :

Dim MyValue
Sub Random()
MyValue = Int((52 * Rnd) + 1) ' Generate random value between 1 and 52.
End Sub


Jason


" wrote:

I need VB code to Randomly generat numbers from 1 to 52. Can anybody
help?