D
Duncan
Hi there,
In relation to my post below I found out how to get it to input the
textbox date on the form into the custom results on the filter
Selection.AutoFilter
Selection.AutoFilter Field:=4, Criteria1:=">=" & Date1,
Operator:=xlAnd _
, Criteria2:="<=" & Date2
My problem is that, if for example date1 textbox is 10/04/06 it puts it
into the filter as 04/10/06!
I dont know why it does this and I am assuming that between vb and
excel there is an american/english date differance it is compensating
for, I thought about using a datepicker control instead but that would
require the user to have that control installed in excel in order to
use it and I didnt want to make it too complicated. I know that a
textbox is not the best idea for inputting a date in case the user puts
it in a differant format but at the moment the form is really simple so
that I can just work out how to do it.
Can anybody suggest anything? maybe using listboxes to choose the date
from (day * month * Year*) but then i would still have to re-work the
order to make it work and there are only 12 months!
I am so confused, this should be simple!
In relation to my post below I found out how to get it to input the
textbox date on the form into the custom results on the filter
Selection.AutoFilter
Selection.AutoFilter Field:=4, Criteria1:=">=" & Date1,
Operator:=xlAnd _
, Criteria2:="<=" & Date2
My problem is that, if for example date1 textbox is 10/04/06 it puts it
into the filter as 04/10/06!
I dont know why it does this and I am assuming that between vb and
excel there is an american/english date differance it is compensating
for, I thought about using a datepicker control instead but that would
require the user to have that control installed in excel in order to
use it and I didnt want to make it too complicated. I know that a
textbox is not the best idea for inputting a date in case the user puts
it in a differant format but at the moment the form is really simple so
that I can just work out how to do it.
Can anybody suggest anything? maybe using listboxes to choose the date
from (day * month * Year*) but then i would still have to re-work the
order to make it work and there are only 12 months!
I am so confused, this should be simple!