Réponse acceptée !
Doublon corrigé ;)
Type tes variables, tu auras bien moins de surprises !!!
'Module-level variables to hold property values:
Private mVal1
As DoublePrivate mVal2
As DoublePublic Function Multiplication() As Double
Multiplication = mVal1 * mVal2
End Function
Public Function Division() As Double
If mVal2 <> 0 Then
Division = mVal1 / mVal2
Else
Division = "Undefined"
End If
End Function
Public Function Addition() As Double
Addition = mVal1 + mVal2
End Function
Public Function Soustraction() As Double
Soustraction = mVal1 - mVal2
End Function
Public Property Let Value1(Byval Setting As Double)
' Store setting in module-level variable.
mVal1 = Setting
End Property
Public Property Let Value2(Byval Setting As Double)
' Store setting in module-level variable.
mVal2 = Setting
End Property
Public Function Hypotenuse()
As Double 'Calculate the hypotenuse of a right-angled
'triangle (the side opposite the right side).
Hypotenuse = Sqr((mVal1 ^ 2) + (mVal2 ^ 2))
End Function
Et après on voit partout que le vb6 est lent, tsssss