I'm looking for a macro for my A File that runs the following in LibreOffice:
I need to press File A button to Run a macro located in the other File B.
Note:
1) I already have file B open.
2) Macro name in file B is:
macro: Clear everything
library: VBAProject
module: Module1
thank you.
[Solved] Run Macro in Another File
[Solved] Run Macro in Another File
Last edited by Math on Tue Nov 13, 2018 12:49 pm, edited 1 time in total.
LibreOffice 5.4.4.2 on Windows 7
Re: macro: Run Macro in Another File
The file "B" is an xls/xlsx type document? It will not work with AOO/LO.library: VBAProject
Always use the international standard Open Document Formats for your important documents.
The VBA is not compatible with the StarBasic+API of the AOO/LO. You must rewrite the VBA macros for AOO/LO.
Plese upload one or two real sample document together with the embedded macros here.
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: Run Macro in Another File
sr. Zizi64,
I previously worked with Excel files, where I had several macros in the VBAProject library of the Excel file.
I made conversion from File.xls to File.ods, and the VBAProject library remained with the same name in the new .ods file.
that is, the new file converted to .ODS, contains the STANDART library and also the VBAProject library.
Can you help me create the command to run the macro in file B, using the name of this VBAProject library.
so I'll do the tests here to see what's going to happen.
thank you very much.
I previously worked with Excel files, where I had several macros in the VBAProject library of the Excel file.
I made conversion from File.xls to File.ods, and the VBAProject library remained with the same name in the new .ods file.
that is, the new file converted to .ODS, contains the STANDART library and also the VBAProject library.
Can you help me create the command to run the macro in file B, using the name of this VBAProject library.
so I'll do the tests here to see what's going to happen.
thank you very much.
LibreOffice 5.4.4.2 on Windows 7
Re: macro: Run Macro in Another File
Delete it and use the Standard library.I made conversion from File.xls to File.ods, and the VBAProject library remained with the same name in the new .ods file.
Sorry, I can not (without a sample file and the macro code).Can you help me create the command to run the macro in file B, using the name of this VBAProject library.
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: Run Macro in Another File
I was doing this in VBA Excel: Application.Run "Book1.xls! MyMacroName"
see example: https://www.rondebruin.nl/win/s9/win001.htm
hugs.
see example: https://www.rondebruin.nl/win/s9/win001.htm
hugs.
LibreOffice 5.4.4.2 on Windows 7
Re: macro: Run Macro in Another File
http://www.openoffice.org/api/docs/comm ... cript.html
Code: Select all
p = OtherDoc.getScriptProvider()
url ="vnd.sun.star.script:Standard.Module1.Main?language=Basic&location=document"
script = p.getScript(url)
ret = script.invoke( aInParam, aOutParamIndex, aOutParam)
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: macro: Run Macro in Another File
...But the AOO/LO Calc are not MS Excel, and the AOO/LO API+StarBasic are not VBA.I was doing this in VBA Excel: Application.Run "Book1.xls! MyMacroName"
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: Run Macro in Another File
Many thanks to the friends who helped me,
I was able to find a solution on the following link:
https://ask.libreoffice.org/pt-br/quest ... -planilha/
hugs to all .
I was able to find a solution on the following link:
https://ask.libreoffice.org/pt-br/quest ... -planilha/
hugs to all .
LibreOffice 5.4.4.2 on Windows 7