<<..:: MARHABAN AHLAN WASAHLAN SUGENG RAWUH SELAMAT DATANG WELCOME ::..>>

Monday 22 February 2010

coding_perbandingan_benar/salah

Dim a As Single, b As Single
Dim c As Boolean
Private Sub Command1_Click()
End
End Sub
Private Sub Command2_Click()
text1.Text = ""
text2.Text = ""
text1.SetFocus
text2.SetFocus
Text3.SetFocus
End Sub
Private Sub Form_Load()
text1.Text = ""
text2.Text = ""
Text3.Text = ""
End Sub
Private Sub Option1_Click()
If text1.Text = "" Then
MsgBox "isi angka dulu!"
End If
If text2.Text = "" Then
MsgBox "isi angka dulu!"
End If
d = text1.Text < text2.Text
If d = True Then
Text3.Text = "Benar"
Else
Text3.Text = "Salah"
End If
End Sub
Private Sub Option2_Click()
If text1.Text = "" Then
MsgBox "isi angka dulu!"
End If
If text2.Text = "" Then
MsgBox "isi angka dulu!"
End If
d = text1.Text > text2.Text
If d = True Then
Text3.Text = "Benar"
Else
Text3.Text = "Salah"
End If
End Sub
Private Sub Option3_Click()
If text1.Text = "" Then
MsgBox "isi angka dulu!"
End If
If text2.Text = "" Then
MsgBox "isi angka dulu!"
End If
d = text1.Text <= text2.Text
If d = True Then
Text3.Text = "Benar"
Else
Text3.Text = "Salah"
End If
End Sub
Private Sub Option4_Click()
If text1.Text = "" Then
MsgBox "isi angka dulu!"
End If
If text2.Text = "" Then
MsgBox "isi angka dulu!"
End If
d = text1.Text >= text2.Text
If d = True Then
Text3.Text = "Benar"
Else
Text3.Text = "Salah"
End If
End Sub
Private Sub Option5_Click()
If text1.Text = "" Then
MsgBox "isi angka dulu!"
End If
If text2.Text = "" Then
MsgBox "isi angka dulu!"
End If
d = text1.Text = text2.Text
If d = True Then
Text3.Text = "Benar"
Else
Text3.Text = "Salah"
End If
End Sub
Private Sub Option6_Click()
If text1.Text = "" Then
MsgBox "isi angka dulu!"
End If
If text2.Text = "" Then
MsgBox "isi angka dulu!"
End If
d = text1.Text <> text2.Text
If d = True Then
Text3.Text = "Benar"
Else
Text3.Text = "Salah"
End If
End Sub

No comments:

Post a Comment

TV

Photobucket