Create a macro that runs other macros [closed]
Hi,
I've recorded some macros and now want to have them all run one after another. Is this possible?
Thanks, Naomi
First time here? Check out the FAQ!
Hi,
I've recorded some macros and now want to have them all run one after another. Is this possible?
Thanks, Naomi
Of course it possible! Just write a new procedure, which will cause the old macros in the right order. You can use the Call statement or simply specify the name of an existing macro. For example, as follows:
Sub myOldMacro1()
...
End Sub
Sub myOldMacro2()
...
End Sub
Sub totalСall
Call myOldMacro1() ' With Call statement
For i = 1 to 10
myOldMacro2() ' Without Call statement
Next i
myOldMacro1() ' Without Call statement again
End Sub
Every one of your old macros must have a unique name (to know the Basic which of macro is invoked in each case).
Asked: 2012-06-05 22:50:58 +0200
Seen: 4,681 times
Last updated: Jun 06 '12
Can't save LibreOffice Basic Macro in .xls file [closed]
Auto Formatting Sheet based on date [closed]
Is there an alternative to Oracle Crystal Ball for LibreOffice Calc? [closed]
Calc Macro Functionality [closed]
retrieving formula values [closed]
How do I export a chart in an image format from LibreOffice Calc? [closed]
Are there plans for a "papercut" project for libreoffice [closed]
Is it normal for Calc goal seek to take very long? [closed]
Please refine "Search" in Calc - implement functions in Gnumeric [closed]