Expressió compatible amb opcions

Opció compatible activa el mode de compilació Bàsic compatible amb VBA a nivell de mòdul.

warning

Aquesta expressió ha d'afegir-se abans del codi executable del programa, en un mòdul.


note

The function CompatibilityMode() controls runtime mode and affects all code executed after setting or resetting the mode.


This option may affect or assist in the following situations:

note

es requereix compatible amb opcions quan es codifiquen els mòduls de classe.


Sintaxi:

Option Compatible

Exemple:

Special characters as identifiers


        Option Compatible
        ' With this option the code works, otherwise it causes a compiling error
        Sub Main
            ä = 10
            print ä
        End Sub
    
tip

Statement Option VBAsupport 1 sets Option Compatible statement automatically.


Variables scope modification in Using Procedures and Functions with CompatibilityMode() function.

Consulteu Identificant el sistema operatiu i Obtenint informació de sessió per a exemples de mòduls de classe o Access2Base biblioteca bàsica compartida per a altres exemples de classe fent ús del mode compilador compatible amb opcions .