Ask LibreOffice - RSS feedhttps://ask.libreoffice.org/en/questions/Questions and answers for LibreOfficeenFri, 06 Sep 2019 18:50:30 +0200Object Variable Not Set while indexinghttps://ask.libreoffice.org/en/question/207690/object-variable-not-set-while-indexing/Function Interest_Declining_Balance(optional OB,optional pmt(),optional purchase(),optional Days() as integer, optional rate)
dim Balance as double
dim Balance_Due as double
dim Sum as integer
dim Interest as double
dim Months as double
for i = 1 to UBound(Days)
Balance = (OB + pmt(i,1)-purchase(i,1))*Days(i,1)
next i
for a = 1 to UBound(Days)
Sum = Sum + Days(a,1)
next a
Balance_Due = Balance / Sum
Months = Sum/30
Interest = rate/100
Interest_Declining_Balance = (Balance_Due*Interest*Months)
End FunctionFri, 06 Sep 2019 18:31:19 +0200https://ask.libreoffice.org/en/question/207690/object-variable-not-set-while-indexing/Comment by Opaque for <p>Function Interest_Declining_Balance(optional OB,optional pmt(),optional purchase(),optional Days() as integer, optional rate)
dim Balance as double
dim Balance_Due as double
dim Sum as integer
dim Interest as double
dim Months as double </p>
<pre><code> for i = 1 to UBound(Days)
Balance = (OB + pmt(i,1)-purchase(i,1))*Days(i,1)
next i
for a = 1 to UBound(Days)
Sum = Sum + Days(a,1)
next a
Balance_Due = Balance / Sum
Months = Sum/30
Interest = rate/100
Interest_Declining_Balance = (Balance_Due*Interest*Months)
End Function
</code></pre>
https://ask.libreoffice.org/en/question/207690/object-variable-not-set-while-indexing/?comment=207692#post-id-207692Please reformat into something more readable, tell us how you call that and ask a question.Fri, 06 Sep 2019 18:50:30 +0200https://ask.libreoffice.org/en/question/207690/object-variable-not-set-while-indexing/?comment=207692#post-id-207692