In BASIC is there a way to test if a given named sub or function exists, i.e. is defined?
If I use ThisComponent.BasicLibraries.getByName("Standard").getByName("Module1")
I can get the BASIC code that I’m interested in, and then I can search it with instr
, but I was hoping for a way to have LO parse the BASIC and tell me if a given, named module exists.
Similar to this in VBA.
Would also appreciate it if you could tell me how to call ANY given module (Sub or Function), regardless of default scoping.
(I want code in My Macros & Dialogs to see if my current document has a function to provide modifiers to the more general code. In other words I want my document to call a program in the global library, that intern looks for and possibly calls code in my document’s basic.)