O'Reilly logo

Learn OpenOffice.org Spreadsheet Macro Programming by Dr. Mark Alexander Bain

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Writing Macros

You'll remember from Chapter 1 that we use the OOo Basic Editor to work with macros:

It's here that we can edit, run, save, and debug the code. You'll also remember that a macro is automatically created for us (Main). This is the macro that OOo will run when we click the Run button (as long as you keep Main as the first macro in the module).

Now, there's something that you may be wondering about in the definition of the macro. Why does it say:

Sub Main
End Sub

and not:

Macro Main
End Macro

That's because macro is actually the generic name for Subroutines and Functions, and it's these that we're going to write. Let's start ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required