<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - BASIC runtime error. '380' Incorrect property value"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=81003#c10">Comment # 10</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - BASIC runtime error. '380' Incorrect property value"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=81003">bug 81003</a>
              from <span class="vcard"><a class="email" href="mailto:himajin100000@gmail.com" title="himajin100000@gmail.com">himajin100000@gmail.com</a>
</span></b>
        <pre>When I changed the given code as follows,

Public Function getCompound(initValue As Double, initDate, finalDate, intRate
As Double) As String' Calculate and apply compound interest for the period
specified
    Dim adjPeriod As Double
    adjPeriod = (finalDate - initDate) / DAYS_PER_YEAR
    getCompound = TypeName(initDate)

End Function

I mean,

1. Removed the type declaration from initDate and finalDate
2. I changed the returned value to TypeName of initDate
3. Changed the return type to String

The returned value on the cell where this function is used was "Range"

<a href="https://opengrok.libreoffice.org/xref/core/sc/source/core/tool/interpr4.cxx?r=6873e0a9#3304">https://opengrok.libreoffice.org/xref/core/sc/source/core/tool/interpr4.cxx?r=6873e0a9#3304</a></pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>