Resolved Question: Excel VBA assistance please for sort from a userform by DTPicker ..value?

Hello everyone,

Just this year I began an honest effort to learn VBA, and while i've hit some bumps in the road, I'm gradually getting better- still a long way togo. I'm very excited to be almost finished the particular workbook I'm on, but alas I've hit one final obstacle before it's compete.

Any help would be very much appreciated! I can't figure this one out.

I've got a time tracker wb, w/ 5 sheets. On sheet 1 (Time Keeper), a UserForm2 is launched to search sheet 5 (Time Log) for occurances of a username (from the variable combousers dropdown)

This then retrieves adjacent values from the search rows that contain that value and returns those values to Sheet1. Once in sheet one, I'd like to have the values auto sorted based off of the date pickers on the userform. (DTPicker 4 & 5)

My Challenge is that I cannot get the criteria of auto sort to recognize the values that are inputed for the date pickers.

It works fine when I manually define the dates, but I need it to be a variable, like "Fromdate"

Any help would be appreciated! If i left out any details, please let me now.

Private Sub cmdcancel_Click()
Unload Me
End Sub

Private Sub cmdquery_Click()

Dim i, LastRow, rng As Range
LastRow = Sheets("Time Log").Range("A" & Rows.Count).End(xlUp).Row
Set rng = Sheets("Time Log").Range("A1:A" & LastRow)
ActiveWorkbook.Sheets("Time Keeper").Activate
Range("b28:i1500").clear
Range("b28").Select

If IsEmpty(ActiveCell) = False Then

ActiveCell.Offset(1, 0).Select

End If

For Each cell In rng
If UCase(cell.Value) = UCase(Me.combousers.Value) Then

ActiveCell.Value = cell.Offset(0, 0).Value
ActiveCell.Offset(0, 1).Value = cell.Offset(0, 1).Value
ActiveCell.Offset(0, 2).Value = cell.Offset(0, 2).Value
ActiveCell.Offset(0, 3).Value = cell.Offset(0, 3).Value
ActiveCell.Offset(0, 4).Value = cell.Offset(0, 4).Value
ActiveCell.Offset(0, 6).Value = cell.Offset(0, 5).Value
ActiveCell.Offset(0, 7).Value = cell.Offset(0, 6).Value
ActiveCell.Offset(1, 0).Select
ActiveCell.Value = ""
End If
Next
Range("E28:H1500").Select
With Selection
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Range("H28:H1500").Select
Selection.NumberFormat = "[$-409]m/d/yy h:mm AM/PM;@"
Range("B28").Select

Dim Fromdate As String
Fromdate = DTPicker4.Value
Range("F26:F1500").Select
Selection.AutoFilter Field:=1, Criteria1:=">Fromdate", Operator:=xlAnd

End Sub