Harry Covair
Member
Hi the forum,
I would submit you an Excel problem or bug.
In an Excel worksheet, cell B2 contains 1/1/1900, B3 = 2/1/1900 and so on.
When I apply some date functions or convert it in number, the date is well 1/1/1900.
But when, in VBA, I use the value of the cell it appears to be the 31/12/1899 which causes problem in instructions such as (x = 2)
“While Month(Cells(x, 2)) = Month(Cells(x + 1, 2))” for detecting the change of months. It gives "12 = 1" ans thus, in VBA, cell B2 has not the same month as B3.
Do some members have ever been confronted with this problem? Any solution to solve it?
Thanks in advance for the answers.
Harry
I would submit you an Excel problem or bug.
In an Excel worksheet, cell B2 contains 1/1/1900, B3 = 2/1/1900 and so on.
When I apply some date functions or convert it in number, the date is well 1/1/1900.
But when, in VBA, I use the value of the cell it appears to be the 31/12/1899 which causes problem in instructions such as (x = 2)
“While Month(Cells(x, 2)) = Month(Cells(x + 1, 2))” for detecting the change of months. It gives "12 = 1" ans thus, in VBA, cell B2 has not the same month as B3.
Do some members have ever been confronted with this problem? Any solution to solve it?
Thanks in advance for the answers.
Harry