7,763
社区成员
发帖
与我相关
我的任务
分享
Private Sub Form_Load()
Dim o As New OceDoor
SetProperty o, "h", "123"
End Sub
Public Sub SetProperty(Objt As OceDoor, PropName As String, PropValue As String)
Select Case PropName
Case "b": Objt.Width = Val(PropValue) '执行到这里报错!!!!
Case "h": Objt.Height = Val(PropValue)
Case Else: MsgBox "赋值失败!"
End Select
End Sub
Dim b0 As Double
Public Property Get Width() As Double
Width = b0
End Property
Public Property Let Width(ByVal NewValue As Double)
'内部实现过程省略从略
End Property
Public Property Get Height() As Double
Height = b0
End Property
Public Property Let Height(ByVal NewValue As Double)
'内部实现过程省略从略
End Property