A
Art Montz
"Out of stack space" error.... can't figure why. Trying to
create a simple object.
Sub TestLoanObject()
Dim rg As Range
Dim objLoan As Loan
Set rg = ThisWorkbook.Worksheets("Loans").Range("A2")
Set objLoan = New Loan
Do Until IsEmpty(rg)
With objLoan
-- it hangs here when trying to assign a value to the Term
property --
.Term = rg.Offset(0, 1).Value
.InterestRate = rg.Offset(0, 2).Value
.PrincipalAmount = rg.Offset(0, 3).Value
rg.Offset(0, 4).Value = .Payment
End With
Set rg = rg.Offset(1, 0)
Loop
Set objLoan = Nothing
Set rg = Nothing
End Sub
create a simple object.
Sub TestLoanObject()
Dim rg As Range
Dim objLoan As Loan
Set rg = ThisWorkbook.Worksheets("Loans").Range("A2")
Set objLoan = New Loan
Do Until IsEmpty(rg)
With objLoan
-- it hangs here when trying to assign a value to the Term
property --
.Term = rg.Offset(0, 1).Value
.InterestRate = rg.Offset(0, 2).Value
.PrincipalAmount = rg.Offset(0, 3).Value
rg.Offset(0, 4).Value = .Payment
End With
Set rg = rg.Offset(1, 0)
Loop
Set objLoan = Nothing
Set rg = Nothing
End Sub