Kode Program :
Dim hasil As Single
Dim value1 As Single, value2 As Single
Private Sub Option1_Click()
value1 = Text1.Text
value2 = Text2.Text
hasil = value1 + value2
Text3.Text = hasil
End Sub
Private Sub Option10_Click()
value1 = Text1.Text
value2 = Text2.Text
hasil = value1 = value2
Text3.Text = Format(hasil, "TRUE/FALSE")
End Sub
Private Sub Option11_Click()
value1 = Text1.Text
value2 = Text2.Text
hasil = value1 <> value2
Text3.Text = Format(hasil, "TRUE/FALSE")
End Sub
Private Sub Option12_Click()
value1 = Text1.Text
value2 = Text2.Text
hasil = value1 And value2
Text3.Text = Format(hasil, "TRUE/FALSE")
End Sub
Private Sub Option13_Click()
value1 = Text1.Text
value2 = Text2.Text
hasil = value1 Or value2
Text3.Text = Format(hasil, "TRUE/FALSE")
End Sub
Private Sub Option14_Click()
value1 = Text1.Text
value2 = Text2.Text
hasil = Not value1
Text3.Text = Format(hasil, "TRUE/FALSE")
End Sub
Private Sub Option2_Click()
value1 = Text1.Text
value2 = Text2.Text
hasil = value1 - value2
Text3.Text = hasil
End Sub
Private Sub Option3_Click()
value1 = Text1.Text
value2 = Text2.Text
hasil = value1 * value2
Text3.Text = hasil
End Sub
Private Sub Option4_Click()
value1 = Text1.Text
value2 = Text2.Text
hasil = value1 / value2
Text3.Text = hasil
End Sub
Private Sub Option5_Click()
value1 = Text1.Text
value2 = Text2.Text
hasil = value1 & value2
Text3.Text = hasil
End Sub
Private Sub Option6_Click()
value1 = Text1.Text
value2 = Text2.Text
hasil = value1 > value2
Text3.Text = Format(hasil, "TRUE/FALSE")
End Sub
Private Sub Option7_Click()
value1 = Text1.Text
value2 = Text2.Text
hasil = value1 < value2
Text3.Text = Format(hasil, "TRUE/FALSE")
End Sub
Private Sub Option8_Click()
value1 = Text1.Text
value2 = Text2.Text
hasil = value1 >= value2
Text3.Text = Format(hasil, "TRUE/FALSE")
End Sub
Private Sub Option9_Click()
value1 = Text1.Text
value2 = Text2.Text
hasil = value1 <= value2
Text3.Text = Format(hasil, "TRUE/FALSE")
End Sub
Read More … Membuat Program Kalkulator Visual Basic