Try this:

VB Code:
  1. Private Function MakeRandom(intLowest As Integer, intHighest As integer) As Long
  2.     Ramdomize
  3.     Din intTemp As Integer
  4.     If intLowest > intHighest Then
  5.         intTemp = intLowest
  6.         intLowest = intHighest
  7.         intHighest = intTemp
  8.     End If
  9.     MakeRandom = CLng((intHighest - intLowest + 1) * Rnd + intLowest)
  10. End Function

Or, have a look here for some new functions that were develped for this job

Cheers,

RyanJ