Hey
I have created a function in a calc macro, openoffice, that when cell B2 is changed, the function is either true/false, it works perfectly, but..
When the spreadsheet is closed down and reopened, it writes in the cell where the function is called (=MYPROCEDURE(B2)) "Nothing to do.." and the function does not work, but if I reopen macro and remove the protection, the function works again..?
[Solved] Macro function in Calc OpenOffice
[Solved] Macro function in Calc OpenOffice
Last edited by Hagar Delest on Mon Jan 15, 2024 2:37 pm, edited 1 time in total.
Reason: tagged solved.
Reason: tagged solved.
OpenOffice 4, win10
AndrOpen, Android Lenovo Tablet
AndrOpen, Android Lenovo Tablet
Re: Macro function in calc openoffice
We can not guess the solution without a sample file and the embedded macro code...
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: Macro function in calc openoffice
Here is my calc and It's all in danish, but I'll believe you'll figure it out
The code for the macro is 2851 and dont let you comfuse at Android, it's not for Android (just a name)
thanks in advance
palle
The code for the macro is 2851 and dont let you comfuse at Android, it's not for Android (just a name)
thanks in advance
palle
- Attachments
-
- Efterkalk_Android.ods
- (27.69 KiB) Downloaded 391 times
OpenOffice 4, win10
AndrOpen, Android Lenovo Tablet
AndrOpen, Android Lenovo Tablet
Re: Macro function in calc openoffice
Because only the Standard directory will be loaded automatically into the memory when you launch the Calc. You must load all of others before you want to use the procedures and function located in them.When the spreadsheet is closed down and reopened, it writes in the cell where the function is called (=MYPROCEDURE(B2)) "Nothing to do.." and the function does not work,
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: Macro function in calc openoffice
...But the Calc custom Cell Functions will work from the Standard Library only. And your MyProcedure() is a Function really, but not a Sub. (And you can not Call a Sub from a cell.)
Here is a code for loading the Kalk library from the macro container of the FILE:
Here is a code for loading the Kalk library from the macro container of the FILE:
Code: Select all
Sub LoadKalk()
If NOT ThisComponent.BasicLibraries.isLibraryLoaded("Kalk") Then
ThisComponent.BasicLibraries.loadLibrary("Kalk")
End If
End sub
Last edited by Zizi64 on Mon Jan 15, 2024 9:52 am, edited 1 time in total.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: Macro function in calc openoffice
Zizi64 wrote: ↑Sun Jan 14, 2024 2:54 pm ...But the Calc custom Cell Functions will work from the Standard Library only. And your MyProcedure() is a Function really, but not a Sub. (And you can not Call a Sub from a cell.)
Here is a code for loading the Kalk library from the macro container of the FILE:
Code: Select all
Sub LoadKalk() If NOT ThisComponent.BasicLibraries.isLibraryLoaded("Kalk") Then ThisComponent.BasicLibraries.loadLibrary("Kalk") End If End sub
OpenOffice 4, win10
AndrOpen, Android Lenovo Tablet
AndrOpen, Android Lenovo Tablet