I have a Basic macro which has to set an array formula. I've read posts in various places regarding the bug in the syntax for the string argument defining a formula in setArrayFormula(), but I don't think that's the problem here. This code using the built-in function SQRT() works fine:
Code: Select all
sFormula="SQRT(Tasks)"
oCellRange=oActSheet.getCellRangeByName("NewStates")
oCellRange.setArrayFormula(sFormula)
But changing the formula to use an add-in REFORMAT_TIME() which I've written does not. The add-in is well debugged and works fine when used interactively, and it's installed to allow access by all users. It's also visible in the extension manager's "All" drop-down menu as well as the Add-In menu. The problem seems to be that the add-in isn't found, and in fact
no add-in function is found, not even the bundled ones. For example:
Code: Select all
sFormula="COMPLEX(Tasks,7)"
oCellRange=oActSheet.getCellRangeByName("NewStates")
oCellRange.setArrayFormula(sFormula)
sets the array formula to {=complex(Tasks, 7)} (note, function name in lower case) and returns an Err:508 diagnostic ("Error: Pair missing" / "Missing bracket, for example, closing brackets, but no opening brackets").
Please, does anyone have any suggestions?
David L.