View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Kanga 85 Kanga 85 is offline
external usenet poster
 
Posts: 34
Default Dates in range not selecting properly

I want to select lines containing a range of dates from a series of
worksheets and to paste these lines into another "Results" worksheet. The
sub works well, except that the date selection picks dates outside my range.
With datestart = 1 Jan 2006, and dateend = 31 Dec 2006, the following
program picks all dates ('datews') within this range, but also gets some
outside it.

'Dim datestart As Date, dateend As Date, datews As Date
'If datews = datestart And datews <= dateend Then
'.....
'End if

Any ideas?
Thanks