I'm trying to compare a date, that I grab from an excel cell, to see if it falls between two dates, as in:
(Not real code)
variable = excel cell value
Select case variable
case ((variable >= firstdate) AND (variable<=seconddate)
.....
The problem i'm getting is that it is treating the variables as strings, even if I use a dim statement to make sure it is a Date.
Any help would be appreciated.
I thought it would be as simple as on the excel sheet i.e.
Date1 > Date2 etc
(Not real code)
variable = excel cell value
Select case variable
case ((variable >= firstdate) AND (variable<=seconddate)
.....
The problem i'm getting is that it is treating the variables as strings, even if I use a dim statement to make sure it is a Date.
Any help would be appreciated.
I thought it would be as simple as on the excel sheet i.e.
Date1 > Date2 etc