Apache OpenOffice (AOO) Bugzilla – Issue 125953
error message "Inadmissible data type ..." is issued; but only during debuging; without debugging everything seems normal
Last modified: 2017-05-20 09:53:00 UTC
Created attachment 84302 [details] Sample program for stringarithmetic using cells B4 and B5 as input and making some calculation with them I wrote a small program for string arthmetic. Everithing went fine until a used the instruction stxt = iif( (sig < 0), "-", "") After I inserted this instruction into the code I got various unclear error messages. Sometimes (but not every time) I got an error already when entering the VBA-editor (Tools->Macro->Organise Macros->OpenOffice Basic ... // string_test.ods->Standard->Module1->StrgPlusMinus // Edit) The Error message at that point is: "Argument not optinal" at any of the 5 Subroutine calls within this short program. Pushing the complie button yields no error But when one of the functions is called from the spreadsheet (for example because a new value is entered in cell B4) it throws the error message "Inadmissible value or data type. Data type mismatch" in line 70 or 71. When I do not enter the VBA-editor everything seems to work OK; no error messages and correct results. I know about the work around (if .. then .. else .. endif) but I would like to know whats wrong with my program.
IIF is fragile in Basic *** This issue has been marked as a duplicate of issue 63614 ***