OpenOffice.org OpenOffice - 3.2 Guida di base Pagina 347

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 497
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 346
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
Vedere la pagina 346
1 2 ... 342 343 344 345 346 347 348 349 350 351 352 ... 496 497

Commenti su questo manuale

Nessun commento