Hi CaP,
the below should work
Function RandDate(dtmStartDate As Date, dtmEndDate As Date) As Date
Randomize
RandDate = DateAdd("d", Int((DateDiff("d", dtmStartDate, dtmEndDate) * Rnd()) + 1), dtmStartDate)
End Function
Sub ghghg()
MsgBox RandDate(#1/13/01#, #1/21/01#)
End Sub...