Help with Code

M

Mike

Hello and Thank You For Any Help
I have created a Excel Ms Query and have created a User form to limit
between Values of DTPicker1 And DTPicker2. I thought this would work.

Any Suggestions Please Help

Sub SetFilter()
With UserForm1
Worksheets("Sheet1").Range("A5").AutoFilter _
Field:=1, _
Criteria1:=">=" & .DTPicker1.Value, _
Operator:=xlAnd, _
Criteria2:="<=" & .DTPicker2.Value
End With
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top