Object Module

Group: Declaration

Description:
An object module implements an ActiveX Automation object.

Dim Obj As objectname

Set Obj = New objectname

See Also: Class Module, Code Module, Uses.

Example:

'A.WWB

'#Uses "System.OBM"

Sub Main

Debug.Print Hex(System.Version)

End Sub

 

'System.OBM

'File|New Module|Object Module

'Edit|Properties|Name=System

Option Explicit

Declare Function GetVersion16 Lib "Kernel" _

Alias "GetVersion" () As Long

Declare Function GetVersion32 Lib "Kernel32" _

Alias "GetVersion" () As Long

 

Public Function Version() As Long

If Win16 Then

Version = GetVersion16

Else

Version = GetVersion32

End If

End Function