Function dateasinteger()
Dim startdate As Date
Dim stopdate As Date
Dim i As Double
startdate = #6/13/2003#
stopdate = #7/13/2003#
For i = CDbl(startdate) To CDbl(stopdate)
'code in here to insert to table
Cdate(i) ' changes the double back to a date
Next
End Function