Dim lastsunday As String
Dim somedate As Long
Dim dayssincesunday As Int
somedate = DateTime.Now
dayssincesunday = DateTime.GetDayOfWeek(somedate) 'returns an int 1 is sunday 2 monday etc
lastsunday = DateTime.Date(DateTime.Add(somedate,0,0, (dayssincesunday - 1) * -1)) 'we subtract 1 as sunday is 1 based not zero based