0% found this document useful (0 votes)
2 views

Macros in Calc

Macros in Calc automate repetitive tasks by recording a set of commands or keystrokes. Users can create, save, and run macros through specific menu options, and there are guidelines for naming them. The macro recorder captures keyboard and mouse actions, but certain actions, such as window switching and non-spreadsheet changes, are not recorded.

Uploaded by

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

Macros in Calc

Macros in Calc automate repetitive tasks by recording a set of commands or keystrokes. Users can create, save, and run macros through specific menu options, and there are guidelines for naming them. The macro recorder captures keyboard and mouse actions, but certain actions, such as window switching and non-spreadsheet changes, are not recorded.

Uploaded by

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

Macros in Spreadsheet

A Macro in Calc is a set of commands or keystrokes that are stored with a name
for automating repeating tasks. A macro is a single instruction that executes a
set of instructions.
For example, a macro may be created for, typing some content in cells, for
formatting the content, for writing a formula, for copying and pasting the
formula, for changing the size of rows and columns, etc.
Advantages of Macros
• The repetitive and routine processes are automated by macros.
• Macros are used to save time and effort.
By default, the macro recording feature is turned off in Calc. Macro recording
can be enabled by selecting Tools > Options > LibreOffice > Advanced. Put the
checkmark on the option “Enable macro recording”.

Steps to record a Macro:


Step 1: Tools > Macros > Record Macro
Step 2. Now start taking actions that will be recorded.
Step 3. Recording of actions starts and a small alert will be displayed. Clicking
on “Stop Recording” button will stop the recording.
Step 4. This will open the Basic Macros dialog window to save and run the
created macro.
Step 5. To save the macro, first select the object where you want the macro to
be saved in the Save Macro to list box.
Step 6. The name of the macro by default is Main and is saved in the Standard
Library in Module1. Change the name of the macro.
Step 7. Click on Save button.

Notes:
o A Standard library is present by default when a spreadsheet is
created and saved.
o A Library is a collection of modules which in turn is a collection of
macros.
o LibreOffice Macros library is provided by LibreOffice and contains
modules with pre-recorded macros and should not be changed.
o My Macros contain macros that we record or add to the
LibreOffice.
Rules for naming a Macro, Module, or a Library:
While naming a Macro, Module, or a Library the name should:
• Begin with a letter
• Not contain spaces
• Not contain special characters except for _ (underscore)

Steps to Run a Macro.


To run a macro, we need to perform the following steps:
Step 1. Tools > Macros > Run Macro
It opens the Macro Selector dialog box.
Step 2. Select the library and module from the library list.
Step 3. Select the macro from the Macro name list.
Step 5. Click on ‘Run’ to run the macro.

Creating and Organising a Simple Macro


The recorded macro is internally stored as instructions written in a
programming language that are executed when we run a macro. We selected a
library or module to store our recorded macro, similarly while creating a macro,
either create a new library/module or edit an existing module stored in a
library.

Steps to create and organize the macro.


Step 1. Click on Tools > Macros > Organize Macros > LibreOffice Basic
It opens the LibreOffice Basic Macro dialog window.
Step 2. Click ‘Organizer’ to open the Basic Macro Organizer dialog box.
Step 3. From Modules tab, select My Macros folder and click on New button.
Step 4. Give a name to the New Module and click on Ok. You will see the new
macro created in My Macros Library under the Standard Library.

Create a library to store a macro.


To create a new library containing modules, click on Library > New.

To create a module to store a macro.


Choose the Modules Tab and select a Module or Click on New to create a new
Module.
The Macro records all the keyboard and mouse actions, but the following
actions are not recorded.
• Opening of windows
• Actions carried out in another window than where the recording was started.
• Window switching
• Actions that are not related to the spreadsheet contents. For example,
changes made in the Options dialog, macro-organizer, customizing.
• Selections are recorded only if they are done by using the keyboard, but not
when the mouse is used.
• The macro recorder works only in Calc and Writer.
_________

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