Function GetDateRange(DateField As String, RangeType As Integer) As String
'Last Month
Dim firstmonth As Date
Dim lastmonth As Date
firstmonth = DateSerial(Year(Date), Month(Date), 0)
lastmonth = DateSerial(Year(firstmonth), Month(firstmonth) - 12, 0)
'Quarterly
Dim begMo As Integer
Dim...