Link to home
Start Free TrialLog in
Avatar of uTab
uTab

asked on

Application-defined or Object-defined error

I have the following code and am receiving the above error:

rs = 30
    re = (trm * 2) + 30 - 1
    rc = Int((re - 30 + 1) / 3 * 2 + 30)
    colIRate = Worksheets("Simple_Calculations").Range("irate").Column
    Worksheets("Compound_Calculations").Range("calcpaymentc") = -Pmt(Cells(rw, colIRate) / 2, Range("issue_term") * 2, Range("sissue"))

The error is with Worksheets("Compound_Calculations").Range("calcpaymentc") = -Pmt(Cells(rw, colIRate) / 2, Range("issue_term") * 2, Range("sissue"))

Can anyone help?
Avatar of byundt
byundt
Flag of United States of America image

Hi uTab,
Try using Application.Pmt
Worksheets("Compound_Calculations").Range("calcpaymentc") = -Application.Pmt(Cells(rw, colIRate) / 2, Range("issue_term") * 2, Range("sissue"))

Cheers!

Brad
ASKER CERTIFIED SOLUTION
Avatar of david_barker
david_barker

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of uTab
uTab

ASKER

Brad Thanks for helping but David Barker got it.

Huge thanks to the both of you.