Функція Option ClassModule

Тут вказують, що модуль є модулем класу, який містить об'єкти, властивості, процедури та функції.

warning

Ця інструкція повинна передувати виконуваному програмному коду модуля.


Параметри:

This statement must be used jointly with Option Compatible statement or Option VBASupport 1, the former is enabling VBA compatibility mode, while the latter is enforcing VBA support on top of compatibility.

Синтаксис:

Option ClassModule

Приклад:


         Option Compatible
         Option ClassModule
             
         ' Optional members go here
             
         Private Sub Class_Initialize()
             ' Optional construction code goes here
         End Sub ' Constructor
         Private Sub Class_Terminate()
             ' Optional destruction code goes here
         End Sub ' Destructor
             
         ' Properties go here.
             
         ' Procedures & functions go here.
             
      

Будь ласка, підтримайте нас!