Can anyone explain why I get a result of zero?
Dim TheMonth As Integer
Dim Theyear As Long
Dim x As Integer
Lastdate = Mainarray(Erow, 1) <---Date
TheMonth = Month(Lastdate)
Theyear = Year(Lastdate)
For x = 1 To 6
TheMonth = TheMonth + 1
If TheMonth > 12 Then
TheMonth =...