summaryrefslogtreecommitdiffstats
path: root/helpcontent2/source/text/sbasic/shared/classmodule.xhp
blob: df14f9ad75c771f692c2c5ea12530f6b88ba41a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?xml version="1.0" encoding="UTF-8"?>
<helpdocument version="1.0">
    <!--
    * This file is part of the LibreOffice project.
    *
    * This Source Code Form is subject to the terms of the Mozilla Public
    * License, v. 2.0. If a copy of the MPL was not distributed with this
    * file, You can obtain one at http://mozilla.org/MPL/2.0/.
    *
    -->
   <meta>
      <topic id="text/sbasic/shared/ClassModule">
         <title id="tit" localize="false" xml-lang="en-US">Option ClassModule</title>
         <filename>/text/sbasic/shared/classmodule.xhp</filename>
      </topic>
   </meta>
   <body>
      <bookmark branch="index" id="N0082" localize="false">
         <bookmark_value>Option ClassModule</bookmark_value>
      </bookmark>

      <section id="classmodulefunction">
          <h1 id="N0083"><variable id="classmodulestatement"><link href="text/sbasic/shared/classmodule.xhp" name="option classmodule">Option ClassModule Statement</link></variable></h1>
          <paragraph role="paragraph" id="N0084">Specifies that the module is a class module that contains members, properties, procedures and functions.</paragraph>
      </section>
      <embed href="text/sbasic/shared/00000003.xhp#beforeexecutable"/>
      <embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
      <paragraph role="paragraph" id="N0089">This statement must be used jointly with <literal>Option Compatible</literal> statement or <literal>Option VBASupport 1</literal>, the former is enabling VBA compatibility mode, while the latter is enforcing VBA support on top of compatibility.</paragraph>
      <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
      <paragraph role="code" localize="false" id="N0086">Option ClassModule</paragraph>
      <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
      <bascode>
         <paragraph role="bascode" localize="false" id="N0092">Option Compatible</paragraph>
         <paragraph role="bascode" localize="false" id="N0093">Option ClassModule</paragraph>
         <paragraph role="bascode" localize="false" id="N0094">    </paragraph>
         <paragraph role="bascode" xml-lang="en-US" id="N0095">&apos; Optional members go here</paragraph>
         <paragraph role="bascode" localize="false" id="N0096">    </paragraph>
         <paragraph role="bascode" localize="false" id="N0097">Private Sub Class_Initialize()</paragraph>
         <paragraph role="bascode" xml-lang="en-US" id="N0098">    &apos; Optional construction code goes here</paragraph>
         <paragraph role="bascode" xml-lang="en-US" id="N0099">End Sub &apos; Constructor</paragraph>
         <paragraph role="bascode" localize="false" id="N0100">Private Sub Class_Terminate()</paragraph>
         <paragraph role="bascode" xml-lang="en-US" id="N0101">    &apos; Optional destruction code goes here</paragraph>
         <paragraph role="bascode" xml-lang="en-US" id="N0102">End Sub &apos; Destructor</paragraph>
         <paragraph role="bascode" localize="false" id="N0103">    </paragraph>
         <paragraph role="bascode" xml-lang="en-US" id="N0104">&apos; Properties go here.</paragraph>
         <paragraph role="bascode" localize="false" id="N0105">    </paragraph>
         <paragraph role="bascode" xml-lang="en-US" id="N0106">&apos; Procedures &amp; functions go here.</paragraph>
         <paragraph role="bascode" localize="false" id="N0107">    </paragraph>
      </bascode>
      <section id="relatedtopics" >
         <paragraph role="paragraph" id="N0108">
            Refer to <link href="text/sbasic/python/python_platform.xhp">Identifying the Operating System</link> and <link href="text/sbasic/python/python_session.xhp">Getting Session Information</link> for class module simple examples.
         </paragraph>
         <paragraph role="paragraph" id="N0109">
            Multiple thorough class examples are available from <link href="text/sbasic/guide/access2base.xhp">Access2Base shared Basic library</link>.
         </paragraph>
         <embed href="text/sbasic/shared/03103200.xhp#optionbasestatement"/>
         <embed href="text/sbasic/shared/03103300.xhp#explicitstatement"/>
         <embed href="text/sbasic/shared/03103350.xhp#vbasupportstatement"/>
         <embed href="text/sbasic/shared/compatible.xhp#compatiblestatement"/>
      </section>
   </body>
</helpdocument>