Q:

My question is about, how to DIM as Date from another cell range?

I have written a VBA macro for running a filter in Excel for displaying records from a specific time and it works. However when I am trying to pull the start and end time from a range it fails. Please see the screenshot of the code and help.
Dim sTime As Date
Dim eTime As Date

sTime = Range("t5").Value
eTime = Range("u5").Value

'Application.Run "Module1.FixTim"
    Application.Goto Reference:="R3C1:R3C15"
    Selection.AutoFilter
'    ActiveSheet.Range("$A$3:$O3").AutoFilter Field:=2, Criteria1:= _
        ">=4:00:00 PM", Operator:=xlAnd, Criteria2:="<=8:00:00 PM" 'THIS WORKS
     ActiveSheet.Range("$A3:$O3").AutoFilter Field:=2, Criteria1:= _
            >=sTime, Operator:=xlAnd, Criteria2:=<=eTime 'DO NOT WORK

It freezes until I press ESC, CTRL+Break

A:

You use the operators without quotes.
Try:
ActiveSheet.Range("$A3:$O3").AutoFilter Field:=2, Criteria1:= _
          " >=" & sTime, Operator:=xlAnd, Criteria2:= "<=" & eTime

