Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default sort from date, to date in list

Am trying to sort a list that contains a big amount of dates, with help
of two textboxes on a userform.
This don't work, but it shows the correct values in the custom dialog
from the dropdown box

Private Sub CommandButton1_Click()
Sheet1.Select
Dim FirstDate As Date
Dim LastDate As Date
FirstDate = TextBox1.Text
LastDate = TextBox2.Text

Selection.AutoFilter Field:=3, Criteria1:="" & Format(FirstDate,
"mm/dd/yyyy"), _
Operator:=xlAnd _
, Criteria2:="<" & Format(LastDate, "mm/dd/yyyy")
Unload UserForm1

Grateful for any help

*** Sent via Developersdex http://www.developersdex.com ***
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
finding a date/time in a list that is closest to an existing date/ Jamie Excel Discussion (Misc queries) 1 May 27th 06 08:54 PM
the date format is not working ,sort by date doesn't work. Rosa Campos Excel Discussion (Misc queries) 1 September 12th 05 10:52 PM
How do you sort a list of dates into date order Tegwen Excel Discussion (Misc queries) 2 August 31st 05 02:04 PM
expanding a start date and end date to show all the dates in a list musicman[_2_] Excel Programming 0 July 20th 05 08:47 PM
In Excel, why sort function fails when applied to a list of date? Excel heavy user Excel Discussion (Misc queries) 1 January 18th 05 06:37 PM


All times are GMT +1. The time now is 02:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"