I get a Run-time error '6': Overflow message on the following line of code.
Both variables are declared as long and correctly evaluate to 45419 and 45425 respectively via
I intend to use the loop to examine each date between the Start and (end of)End date - hence the "+1"
What am I doing wrong?
VBA Code:
For i = StartReportDate To EndReportDate + 1
VBA Code:
StartReportDate = CDbl(CDate(Left(PaymentReport.ActiveSheet.Range("A" & Rows.Count).End(xlUp).Value, 10)))
EndReportDate = CDbl(CDate(Left(PaymentReport.ActiveSheet.Range("A2"), 10)))
What am I doing wrong?