Running several macros from another in Calc [closed]
I'm new to the world of macros and have a simple problem that I cannot seem to find an answer for. I have created three separate macros that work, one called "AddNewRow", one called "CopyCells1" and the other called "CopyCells2". These reside in the Object Catalogue under My Macros & Dialogs/Standard. Each one contains one Sub that is called the same as the Macro name. All I want to do is to have another Macro called "RunAll" that runs the other three, one after the other. The obvious (to me at least) way to do this would be:
Sub RunAll
AddNewRow
CopyCells1
CopyCells2
end sub
Which does nothing. Hoping someone can give me some help to resolve this.
Thanks
Complemento
Thanks for the suggestion but that doesn't work either. I have looked through the "Go learn things" but trying to find a solution in 659 pages of something that is as clear as something that's not very clear is not a preferred option.
Any further ideas would be most welcome.
To clarify my "New to Macros" comment, a long time back (I'm 68 so we're talking 10-40 years or so) I wrote numerous Basic programs, numerous macros for Excel and several quite complex applications in Microsoft Access. Hence I have some basis for what to me seems obvious. I am however new to macros in LibreOffice and consider statements such as "dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")" and "dim args1(0) as new com.sun.star.beans.PropertyValue" to be the work of extra terrestrials with evil intent.
Post the macros ...
Really? If you are new, how can something be obvious? Go learn things. Your example has faulty syntax, it should be something as follows:
Unless, of course, you need to pass arguments.
Hello @SimonM, I totally agree with the mess of the Basic language, I believe that when triggering a command, for example COPY, Basic internally should trigger all the Libraries necessary for its execution, without me having to show the way.
.
Back to your problem, post the macros you made, or if you want to get in direct contact, see here: https://wiki.documentfoundation.org/U..., and send me the file, confidentiality guaranteed.
.
I'm not a programmer, but I've followed LibreOffice since your grandfather, StarOfice 1998.
@SimonM, From what you mentioned I would do this: basic example, information is lacking to be functional.
continuation...
Show the code.