I get BASIC runtime error. ‘380’ Incorrect property value when a simple spreadsheet calls this function in an xls spreadsheet (using LO 4.2.5.2 on Win7 Home Prem)
Rem Attribute VBA_ModuleType=VBAModule
Option VBASupport 1
Option Explicit
Global Const DAYS_PER_YEAR As Double = 365.25
Global Const MONTHS_PER_YEAR As Double = 12#
Public Function getCompound(initValue As Double, initDate As Date, finalDate As Date, intRate As Double) As Double
Dim adjPeriod As Double
adjPeriod = (finalDate - initDate) / DAYS_PER_YEAR
getCompound = initValue * (1 + intRate) ^ adjPeriod
End Function
The macro works if I change VBASupport to 0 but the VBASupport line is added by LO and it is impractical to expect users to change code every time they open a Spreadsheet.
What is it actually objecting to?
The same spreadsheet works fine in OO 4.1.0 with Option VBASupport 1