Dr. Demento
Well-known Member
- Joined
- Nov 2, 2010
- Messages
- 618
- Office Version
- 2019
- 2016
- Platform
- Windows
Can anyone tell me why this bit of code keeps stopping my sub? I have error handling (debug.print err.number/.description) but it doesn't throw any errors There are no erroneous dates, missing dates, or anything like that. It actually filters the column but then it quits!
I have no idea!! Thanks y'all.
VBA Code:
dim dt as date
dt = (Date - (Weekday(Date, vbSunday) - 1))
tbl.Range.AutoFilter Field:=6, _
Operator:=xlFilterValues, _
Criteria1:=">=" & DateSerial(Year(dt), 1, 1), _
Operator:=xlAnd, _
Criteria2:="<=" & dt
I have no idea!! Thanks y'all.
Last edited: