Hi All, I have a worksheet with a lot of date entries on it and I would like to set the Print Area based on a range of dates inputted by the user. I ask the user for a start month and an end month and based on that my code finds the appropriate range. Unfortunately I can't seem to compare Months with just numbers and it crashes at this line -
"If Month(ActiveCell.Value) = limit1 And CODE = 0 Then"
(CODE is just to mark that I've already found a starting month if I haven't already).
Can someone tell me how to compare Months to a user inputted number in excel? In addition how do I tell excel to determine if the cell format is in Date format or just text? Currently I'm forced to use InStr(ActiveCell.Text, "x") because I'm placing an x in rows that don't contain dates.
Thanks in advance!
Bookmarks