ARITHMETIC OPERATION USING VISUAL BASIC

PROGRAM
Dim A As Integer
Dim B As Integer
Dim RESULT As Integer
Private Sub Command1_Click()
A = Text1.Text
B = Text2.Text
RESULT = Val(Text1.Text) + Val(Text2.Text)
Text3.Text = RESULT
End Sub
Private Sub Command2_Click()
A = Text1.Text
B = Text2.Text
RESULT = Val(Text1.Text) - Val(Text2.Text)
Text3.Text = RESULT
End Sub
Private Sub Command3_Click()
A = Text1.Text
B = Text2.Text
RESULT = Val(Text1.Text) * Val(Text2.Text)
Text3.Text = RESULT
End Sub


Private Sub Command4_Click()
A = Text1.Text
B = Text2.Text
RESULT = Val(Text1.Text) / Val(Text2.Text)
Text3.Text = RESULT
End Sub
Private Sub Command5_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
End Sub
Private Sub Command6_Click()
End

End Sub

0 Comment "ARITHMETIC OPERATION USING VISUAL BASIC "

Post a Comment