runMacro 'On Local Error GOTO NextIteration' not working

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

LO Calc:
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+deb12u5
Calc: threaded

A quick little menu takes an array of strings that are function names
passes that string to JohnSun’s runMacro().
In the code “oModuleNames = oLib.getElementNames()” returns this array: ( explorations, See, play, sheet3ex, listBoxEx, Inspect, chart, rangeWalk ).
The first time through the loop when macroName =
“vnd.sun.star.script:explore.explorations.lineChartDo?language=Basic&location=document”
“oScript = oScriptProvider.getScript(macroName)”
throws an error exectuion jumps to NextIteration: and tries again.
The second time through macroName =
“vnd.sun.star.script:explore.See.lineChartDo?language=Basic&location=document” and rather than jumping to
NextIteration: execution stops with this error message.
“BASIC runtime error.
An exception occurred
Type: com.sun.star.script.provider.ScriptFrameworkErrorException
Message: The following Basic script could not be found:
library: ‘explore’
module: ‘See’
method: ‘lineChartDo’
location: ‘document’
at ./scripting/source/basprov/basprov.cxx:365.”
This menu using runMacro() did work until I shuffled things around a bit. Trying to get organized I put runMacro() in a separate module along with rangeWalk() which uses it, put “lineChartDo” in a “charts” module with some other chart routines. Having routines writing to different sheets I collected some of them into their own module but they are all in the “explore” library under “explorations.ods”.
runMacro() can be found here:

I can post the menu code if anyone is interested.
At the moment I’ve not a clue why the “On Local Error GOTO” fails so any pointers would be appreciated.

Happy Friday the 13th and be well.
Thanks,
Mike

As an addendum, all the routines in the menu, other than lineChartDo, are in the ‘explorations’ module and since that is the first module checked they all run just fine from the menu. lineChartDo which is failing is the only one forcing to check other modules and it’s in ‘chart’ module.
Just a little more info. I created another menu for the sheet3 routines where the first routine ‘sheetClear’ comes from the ‘explorations’ module and and all the rest are in the ‘sheet3Ex’ module. trying to execute any of the routines from the ‘sheet3Ex’ module die when “oScript = oScriptProvider.getScript(macroName)” fails to find the script in the ‘See’ module. The first error when the routine wasn’t found in the ‘explorations’ module was caught by the ‘On Local Error’ but the second wasn’t. Initially that ‘On Local Error’ statement was outside the for/next loop but putting inside the loop didn’t help.
I’m stumped folks.
Suggestions?
Be well,
Mike

Plese upload your ODF type sample file (with the embedded macro code) here.

Asuming you meant ODS, it’s bedtime here and will take a fair amount of time to copy then strip out all but enough to show what I’m seeing.
I’m not adverse to the task but hope you will be satisfied if I do it manana.
Mike

ODF: Open Document Format

.ods: opendocument spreadsheet
.ots: opentemplate spreadsheet
and
.odf: opendocument formula

Here is a stripped down spreadsheet with buttons that will call functions that work and buttons for menus on sheets 1 & 3 to call the same functions that don’t work from the menu.
Mike
explorationsMini.ods (45.5 KB)