Date within a cell: which month is it?

If I am supposed to be asking this question in a different forum, please give me directions, otherwise:

In VBA I'm trying to determine if a date in a given cell is within a certain month, e.g., if a cell contains 1/8/2006, I want to be able to print Jan '06 in another cell. Below is what I have tried so far that doesn't work:

rowctr = 8
If Cells(rowctr, 10) >= "1/1/2006" And Cells(rowctr, 10) <= "1/31/2006" Then
Range("AA" & rowctr).Select
ActiveCell = "Jan 06"
End If

Strange to me, but the above works for double digit days, i.e., 1/10 thru 1/31, but not single digit days, 1/1 thru 1/9/06.

Obviously I'm missing something very basic but don't know what it is. Thanks for any help, John




Answer this question

Date within a cell: which month is it?