0% found this document useful (0 votes)
19 views6 pages

What Is Macro

What is Macro? You will understand once u read this PDF.

Uploaded by

khleima27
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views6 pages

What Is Macro

What is Macro? You will understand once u read this PDF.

Uploaded by

khleima27
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

What is Macro in LibreOffice Calc?

Date: 6th May 2022


A macro is a saved sequence of commands or keystrokes that
are stored for later use. In other simple words, it is recording of
tasks we are doing in Calc and do the same task without
taking much time.
An example of a simple macro is one that “types” your
address. The LibreOffice macro language is very flexible,
allowing automation of both simple and complex tasks. Macros
are very useful when you have to repeat the same task in the
same way over and over again.
LibreOffice macros are usually written in a language called
LibreOffice Basic, sometimes abbreviated to Basic. Although
you can learn Basic and write macros, there is a steep learning
curve to writing macros from scratch. The usual methods for a
beginner are to use macros that someone else has written or
use the built-in macro recorder, which records keystrokes and
saves them for use.
Recording a macro
If you have to repeatedly enter the same information, you can copy this information after it has been
entered into your document for the first time, then paste the information into your document each time
you want to use it. However, if something else is copied to the clipboard, the contents on the clipboard
are changed. This means that you have to re-copy your repeated information. To overcome this
problem, you can create a macro that enters your repeated information.

 Important Note
Before starting recording task using Macro,
Make sure macro recording is enabled by going
to
Tools > Options > LibreOffice > Advanced on
the main menu bar and selecting the option Enable
macro recording. By default, this feature is turned
off when LibreOffice was installed on your
computer.
Self-practice assignment to record a macro to fill a
column say column C with red color.
1) Click on column C
2) To start recording a macro
Click Tools --> Macros --> Record Macro on the main menu
bar. Then a small dialog is displayed indicating that LibreOffice
is recording a macro.

3. Click on Format Cells Click Background Tab click color


Click red color O.K

4) Click Stop Recording on the small Recording dialog to stop


recording and the LibreOffice Basic Macros dialog opens
8) In the Macro name text box, type a name for the macro you
have just recorded, for example RED.
9) Click Save to save the macro and close the LibreOffice Basic
Macros dialog.

 Note
When LibreOffice creates a new module, it automatically adds the macro named Main.
2.Running a macro called RED recorded in the above steps
To fill another column say column F
1) Click on column F Then click Tools > Macros > Run Macro on the main menu bar to open the
Macro Selector dialog (Figure ).
2)For example, select your newly created macro RED and click Run.
3)Alternatively, go to Tools > Macros > Organize Macros > LibreOffice Basic on the main
menu bar to open the LibreOffice Basic Macros dialog, select your macro and click Run.
Then column F will automatically fill with red color after clicking
Run button.

Figure : Macro Selector dialog

3. Assigning macro RED to any figure say a circle.


Click insert menushapeBasic shapeClick Circle
Then hold down left mouse button and drag across anywhere on the sheet. Then
release the button.
Right click on the circleclick Assign Macro Select the macro RED as in the
following figure.
Click on column I. Then click on the circle.
Then column I will fill with red color automatically just after single click on the circle.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy