类模块一:类名:cBomReturnValue
Option Explicit
'保持属性值的局部变量
Private mvarAssBom As String '局部复制
Private mvarBomPoint As String '局部复制
Private mvarQuantity As Double '局部复制
Private mvarExpression As String '局部复制
Public Property Let Expression(ByVal vData As String)
'向属性指派值时使用,位于赋值语句的左边。
'Syntax: X.Expression = 5
mvarExpression = vData
End Property
Public Property Get Expression() As String
'检索属性值时使用,位于赋值语句的右边。
'Syntax: Debug.Print X.Expression
Expression = mvarExpression
End Property
Public Property Let Quantity(ByVal vData As Double)
'向属性指派值时使用,位于赋值语句的左边。
'Syntax: X.Quantity = 5
mvarQuantity = vData
End Property
Public Property Get Quantity() As Double
'检索属性值时使用,位于赋值语句的右边。
'Syntax: Debug.Print X.Quantity
Quantity = mvarQuantity
End Property
Public Property Let BomPoint(ByVal vData As String)
'向属性指派值时使用,位于赋值语句的左边。
'Syntax: X.BomPoint = 5
mvarBomPoint = vData
End Property
Public Property Get BomPoint() As String
'检索属性值时使用,位于赋值语句的右边。
'Syntax: Debug.Print X.BomPoint
BomPoint = mvarBomPoint
End Property
Public Property Let AssBom(ByVal vData As String)
'向属性指派值时使用,位于赋值语句的左边。
'Syntax: X.AssBom = 5
mvarAssBom = vData
End Property
Public Property Get AssBom() As String
'检索属性值时使用,位于赋值语句的右边。
'Syntax: Debug.Print X.AssBom
AssBom = mvarAssBom
End Property
类模块二:类名:cBomValue
Option Explicit
'保持属性值的局部变量
Private mvarAssBom As String '局部复制
Private mvarBomPoint As String '局部复制
Private mvarQuantity As Double '局部复制
Public Property Let Quantity(ByVal vData As Double)
'向属性指派值时使用,位于赋值语句的左边。
'Syntax: X.Quantity = 5
mvarQuantity = vData
End Property
Public Property Get Quantity() As Double
'检索属性值时使用,位于赋值语句的右边。
'Syntax: Debug.Print X.Quantity
Quantity = mvarQuantity
End Property
Public Property Let BomPoint(ByVal vData As String)
'向属性指派值时使用,位于赋值语句的左边。
'Syntax: X.BomPoint = 5
mvarBomPoint = vData
End Property
Public Property Get BomPoint() As String
'检索属性值时使用,位于赋值语句的右边。
'Syntax: Debug.Print X.BomPoint
BomPoint = mvarBomPoint
End Property
Public Property Let AssBom(ByVal vData As String)
'向属性指派值时使用,位于赋值语句的左边。
'Syntax: X.AssBom = 5
mvarAssBom = vData
End Property
Public Property Get AssBom() As String
'检索属性值时使用,位于赋值语句的右边。
'Syntax: Debug.Print X.AssBom
AssBom = mvarAssBom
End Property
类模块三:类名:cPointValue
Option Explicit
'保持属性值的局部变量
Private mvarBomPoint As String '局部复制
Private mvarQuantity As Double '局部复制
Public Property Let Quantity(ByVal vData As Double)
'向属性指派值时使用,位于赋值语句的左边。
'Syntax: X.Quantity = 5
mvarQuantity = vData
End Property
Public Property Get Quantity() As Double
'检索属性值时使用,位于赋值语句的右边。
'Syntax: Debug.Print X.Quantity
Quantity = mvarQuantity
End Property
Public Property Let BomPoint(ByVal vData As String)
'向属性指派值时使用,位于赋值语句的左边。
'Syntax: X.BomPoint = 5
mvarBomPoint = vData
End Property
Public Property Get BomPoint() As String
'检索属性值时使用,位于赋值语句的右边。
'Syntax: Debug.Print X.BomPoint
BomPoint = mvarBomPoint
End Property
加入后可直接在窗体中Print出列表。