I am trying to do the following

PI_Rate = Rate(Amortization, ExpectedPayment, -LoanAmount) * 12


each of the 4 variables are dim as double for data type


I am trying to put this value in a text box, and when I run the code it debugs with the following error

run-time error '5'
invalid procedure call or argument

and the yellow highlights the above line

when i place the mouse over the following, these are the values

pi_rate = 0
amortization = 360
expectedpayment = 850
loanamount = 100000

could someone please help me

thank you



Josh