Calc Guide
6) Select AuthorsCalcMacros and click Edit to edit the library. Calc
automatically creates a module named Module1 and a macro
named Main.
Figure 297: Basic Integrated Development Environment (IDE)
7) Modify the code so that it is the same as that shown in Listing
2.The important addition is the creation of the NumberFive
function, which returns the number five. The Option Explicit
statement forces all variables to be declared before they are used.
If Option Explicit is omitted, variables are automatically defined
at first use as type Variant.
8) Save the modified Module1.
Listing 2. Function that returns five.
REM ***** BASIC *****
Option Explicit
Sub Main
End Sub
Function NumberFive()
NumberFive = 5
End Function
Chapter 12 Calc Macros 347