tiredofit
Well-known Member
- Joined
- Apr 11, 2013
- Messages
- 1,759
- Office Version
- 365
- 2019
- Platform
- Windows
Something doesn't seem to be quite right with my dates in arrays.
Put a date of 02/01/1900 in cell A1, put a date of 03/01/1900 in cell B1.
Format both to be dates, (choose the type to be 14/03/2001).
If I step into my code and look at the locals window, it says:
Why is it showing the dates out by a day?
Put a date of 02/01/1900 in cell A1, put a date of 03/01/1900 in cell B1.
Format both to be dates, (choose the type to be 14/03/2001).
If I step into my code and look at the locals window, it says:
Code:
MyArray(1,1) has a value of #01/01/1900#
MyArray(1,2) has a value of #02/01/1900#
Code:
Option Explicit
Sub Test()
Dim MyArray() As Variant
MyArray = Cells(1, 1).CurrentRegion.Value
End Sub
Why is it showing the dates out by a day?