A macro is a recording of each and every command and action you perform to complete a task. A macro records your mouse clicks and keystrokes while you work and play them back later. When you run the macro, it plays those actions back in the exact same order. Thus, if you want to repeat the actions multiple times you just need to run the macro.
Create/Record Macros:
Following are the steps to record/create a macro:
1. Go to the Tools tab on the Menu bar->Macros->Record Macro

Observe a small dialog box has appeared on the worksheet displaying Stop Recording.

2. Calc has started recording the Macro. Until you stop the recording, every Calc command and keystroke will be recorded in the macro, in the order in which they are entered.
Suppose the following tasks were performed :
a) We created all borders in the cells A1:C3.
b) Then we changed the background color of cells A1:C3 to green.
3. After we have done all the required tasks, we will stop recording the macro by clicking on the Stop recording option on the dialog box . A new dialog box will open (OpenOffice Basic Macros) in which you have to specify the name of the macro and the location for saving it.

Now we have a macro that can perform in a single operation all the tasks we have performed during recording of the macro.
Run/Use Macros created:
Following are the steps to run/use a macro that we have already created:
1. Go to the Tools tab on the Menu bar->Macros->Run Macros .
2. A dialog box will open showing all the macros created. We will select the one to run and then click on Run button.

3. The tasks performed during recording of the macro will be repeated in the same order in which they were performed. (Running Color Change Macro will create borders around the cells A1:C3 and set their background color to green.)
By default, recorded macros use absolute cell referencing, which means that exact cell locations are recorded into the macro.
Delete Macros:
Following are the steps to delete a macro that we have already created:
1. Go to the Tools tab on the Menu bar->Macros->Organize Macros and select the OpenOffice Basic option.
2. A dialog box listing the macros created will open . Select the macro you want to delete and then click on the Delete button.
