クラスのプロパティは、リテラル値は Let, Get でオブジェクト値は Set, Get で作成します。
Option Explicit
Class MyA
Private p1 ' リテラル
Private o1 ' オブジェクト
Private WshShell
Public Sub Wait
WScript.Sleep 5000
End Sub
' コンストラクター
Private Sub Class_Initialize
p1 = 3
End Sub
' デストラクター
Private Sub Class_Terminate
WScript.Echo "スクリプト 終了: " & p1
End Sub
Public Property Let Point(iP) ' リテラル値を入力する場合
If IsNumeric(iP) Then
p1 = iP
End If
End Property
Public Property Get Point
Point = p1
End Property
Public Property Set ObjPoint(obj) ' オブジェクトを入力する場合
Set o1 = obj
End Property
Public Property Get ObjPoint
Set ObjPoint = o1
End Property
End Class
Dim a
Set a = New MyA
a.Point = 10
a.Wait