Private property Let Value2(By value New_Value2 as Long)
New_value2 = val(Text2.text)
Propertychanged "Value2"
End Property
Private Property Get Value2() as Long
Text2.text = Value2
End Property
Coding part for the four methods Viz. Add, Subtract, Multiply, Divide
Private Sub add()
Text3.text = val(text1.text)+val(text2.text)
End Sub
Private Sub Subtract()
Text3.text = val(text1.text)-val(text2.text)
End Sub
Private Sub Multiply()
Text3.text = val(text1.text)* val(text2.text)
End Sub
Private Sub Divide()
Text3.text = val(text1.text)/val(text2.text)
End Sub
select the make ocx option from the file menu of VB. Save the file as Math1 and your activex is ready. Save the file in the directory where normal acivex provided by VB by default. And you can use this component in your project from the project component menu.