OpenOffice.org OpenOffice - 3.2 Základní průvodce Strana 347

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 497
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 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
Zobrazit stránku 346
1 2 ... 342 343 344 345 346 347 348 349 350 351 352 ... 496 497

Komentáře k této Příručce

Žádné komentáře