mike@RPI4b3:~> uname -a
Linux MikesPI 6.1.0-rpi7-rpi-v8 #1 SMP PREEMPT Debian 1:6.1.63-1+rpt1 (2023-11-24) aarch64 GNU/Linux
Version: 7.4.7.2 / LibreOffice Community
Build ID: 40(Build:2)
CPU threads: 4; OS: Linux 6.1; UI render: default; VCL: x11
Locale: en-US (C); UI: en-US
Raspbian package version: 4:7.4.7-1+rpi1+deb12u8
Calc: threaded As if it makes a difference,
Since Calc’s error messages are so terce and I found this online:
‘’‘Error Codes in LibreOffice Calc’’’
I thought to write a macro that when I entered the error code would display the explanaition.
Many things tried, this is what worked
Function errorCodes()
' Array(code as String, definition as String)
Dim ecArray
ecArray = Array( _
array( "###", "none" & Chr(10) & _
"The cell is not wide enough to display the contents." ), _
array( "#FMT", "none" & Chr(10) & _
"This value is outside of limits valid for this format." ), _
array( "501", "Invalid character" & Chr(10) & _
"Character in a formula is not valid." ), _
array( "502", "Invalid argument" & Chr(10) & _
"Function argument is not valid." & Chr(10) & _
"For example, a negative number for the SQRT() function," & Chr(10) & _
"for this please use IMSQRT()." ), _
array( "503", "#NUM!" & Chr(10) & _
"Invalid floating point operation" & Chr(10) & _
"A calculation results in an overflow of the defined value range." ), _
array( "504", "Parameter list error" & Chr(10) & _
"Function parameter is not valid, " & Chr(10) & _
"for example, text instead of a number," & Chr(10) & _
"or a domain reference instead of cell reference." ) _
)
errorCodes = ecArray
End Function
Sub errExplain()
ec = InputBox( "Error Code?" )
ecArray = errorCodes()
For e = lBound( ecArray ) to uBound( ecArray )
codeArr = ecArray(e(0))
If ec = codeArr(0) Then
okBox(codeArr(0) & " --> " & codeArr(1) )
Exit For
End If
Next
End Sub
Thanks,
Mike