View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ardus Petus Ardus Petus is offline
external usenet poster
 
Posts: 718
Default Dates in range not selecting properly

The code you post is correct (works by me).

The error might reside in some other part of your code.

Why not post your whole code (if not too big)

HTH
--
AP

"Kanga 85" a écrit dans le message de
news: ...
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