I have an odd problem that I have noticed on two worksheets. I have a sheet with dates for the year entered in column A3 and down, starting at 1/1 and going to 12/31. I then have a userform where the user selects a date from a DTPicker and the macro locates the row for the selected date to perform various functions in that row. The problem I have is that when 1/1/YY is selected, the find method always selects the row for date 11/1/YY. I have no idea why it does that and have to manually correct for it ATM. Any insight would be appreciated.
[VBA]Sub Update_Charts_bydates(DtStart As Date, DtEnd As Date)
Dim Ws_1 As Worksheet, Ws_2 As Worksheet
Dim Ch_1 As Chart, Ch_2 As Chart
Dim rngTATdata As Range, rngTATlabels As Range, rngRFTdata As Range, rngRFTlabels As Range
Dim iDtEnd As Integer, iDtStart As Integer
Application.ScreenUpdating = False
Set Ws_1 = Worksheets("Historical") 'sheet with dates entered down starting at A3
Set Ch_1 = Charts("TAT")
Set Ch_2 = Charts("%InSpec")
Set DateHeader = Ws_1.Range(Ws_1.Range("A3"), Ws_1.Range("A3").End(xlDown)) 'set range to find date
On Error GoTo ErrHandler
If Month(DtStart) = 1 And Day(DtStart) = 1 Then '1/1/YY likes to find 11/1/YY instead, so manually correct
iDtStart = 3
Else
iDtStart = DateHeader.Find(DtStart).Row
End If
iDtEnd = DateHeader.Find(DtEnd).Row
'---------------- More code below but not shown
On Error GoTo 0[/VBA]
If you really want to see the sheet I can attach a desensitized version upon request