Hi, I am trying to run my code but it stops at one point and it says invalid procedure call or argument.
Does anyone knows where is the problem? Thanks!
'Calculation of the annual payment
annualPmnt = Pmt(intRate, loanLife, -initLoanAmnt, , 0)
'Initialize beginning balance of the 1st year
yrBegBal = initLoanAmnt
'Loop to calculate and output year-by-year amortization table
For rowNum = 1 To loanLife
intComp = yeBegBal * intRate
princRepay = annualPmnt = intComp
yrEndBal = yrBegBal = princRepay
Cells(outRow + rowNum + 3, 3).Value = rowNum 'this is the year number
Cells(outRow + rowNum + 3, 4).Value = yeBegBal
Cells(outRow + rowNum + 3, 5).Value = annualPmnt
Cells(outRow + rowNum + 3, 6).Value = intComp
Cells(outRow + rowNum + 3, 7).Value = princRepay
Cells(outRow + rowNum + 3, 8).Value = yrEndBal
yrBegBal = yrEndBal
Does anyone knows where is the problem? Thanks!
'Calculation of the annual payment
annualPmnt = Pmt(intRate, loanLife, -initLoanAmnt, , 0)
'Initialize beginning balance of the 1st year
yrBegBal = initLoanAmnt
'Loop to calculate and output year-by-year amortization table
For rowNum = 1 To loanLife
intComp = yeBegBal * intRate
princRepay = annualPmnt = intComp
yrEndBal = yrBegBal = princRepay
Cells(outRow + rowNum + 3, 3).Value = rowNum 'this is the year number
Cells(outRow + rowNum + 3, 4).Value = yeBegBal
Cells(outRow + rowNum + 3, 5).Value = annualPmnt
Cells(outRow + rowNum + 3, 6).Value = intComp
Cells(outRow + rowNum + 3, 7).Value = princRepay
Cells(outRow + rowNum + 3, 8).Value = yrEndBal
yrBegBal = yrEndBal