嗨,我在下面的代码中得到了错误91,我无法弄明白!
我认为当我尝试在另一个类模块clsPeril
中声明类模块xxxLoB
时,问题就出现了。我想我已经过度设计了这个!
模块是:
Public Sub SomeSub()
Dim objPolicy As New xxxPolicy
objPolicy.xxxLoB.FLEA.Attl = 10 <---- error is here
objPolicy.xxxLoB.Flood = 100
End Sub
课程模块xxxPolicy
:
Dim objLoB As New xxxLoB
Public Property Get xxxLoB() As xxxLoB
Set xxxLoB = objLoB
End Property
Public Property Set xxxLoB(ByVal objNewValue As xxxLoB)
Set objLoB = objNewValue
End Property
课程模块xxxLoB
:
Dim dblFLEA As clsPeril
Dim dblFlood As Double
Public Property Get FLEA() As clsPeril
FLEA.Attl = dblFLEA
End Property
Public Property Let FLEA(ByVal FLEANewValue As clsPeril)
dblFLEA = FLEANewValue
End Property
Public Property Get Flood() As Double
Flood = dblFlood
End Property
Public Property Let Flood(ByVal FloodNewValue As Double)
dblFlood = FloodNewValue
End Property
课程模块clsPeril
:
Public Attl As Double
Public Large As Double
Public Cat As Double
Public Excess As Double
Public SI As Double