Hi guys,
New to macros here.
Have a macro that does a reasonably simple calculation:
Table(j, 13) = DateAdd("m", j, Day(DoD) & Run_Start)
Basically pulls the day from a another date called DoD, concatenates it to the month and year, and adds a few months onto it.
Now, for dates which cannot be interpreted in the american date format, this works correctly.
Output example:
DoD (in)
29/11/2009
29/11/2009
29/11/2009
29/11/2009
29/11/2009
29/11/2009
Table (out)
29/12/2009
29/01/2010
28/02/2010
29/03/2010
29/04/2010
29/05/2010
Good!
For dates which can be valid american dates, it adds to the day:
DoD (in)
12/11/2009
12/11/2009
12/11/2009
12/11/2009
Table (out)
1/11/2010
2/11/2010
3/11/2010
4/11/2010
Bad..
Does anyone know how to fix this?
I try to do my research before posting and have tried to solve it by putting ReDim ClaimsTable(j, 13) As Date in the loop, but it doesn't seem to like it.
Thanks
Bookmarks