0

I'm trying to learn to write Macros in LO Calc, version 4.2.2.1. When I run any function in a blank spreadsheet, it returns the #VALUE! error in any cell. Here's one such function, which should output the result of two parameters added together.

Function AddNumbers(X, Y)
    Return X + Y
End Function

When I type the formula =ADDNUMBERS(3, 6) in a cell on the spreadsheet which the library is contained, it returns #VALUE!. I tried to use a parameterless function:

Function ReturnFive
    ReturnFive = 5
End Function

=RETURNFIVE() still returns #VALUE!. I've set macro security to Low, so all macros should be able to run. Why might I be getting this problem?

Community
  • 1
  • 1
Lou
  • 2,200
  • 2
  • 33
  • 66

1 Answers1

0

I worked out the problem. The library was stored in the Macro organiser under LibreOffice Macros, whereas it should have be stored within the specific spreadsheet. All functions now work as expected.

Lou
  • 2,200
  • 2
  • 33
  • 66