PROGRAM VB


Private Sub Combo1_Click()
If Combo1.Text = “pagi” Then
List1.AddItem (“07.00”)
List1.AddItem (“07.30”)
List1.AddItem (“08.00”)
ElseIf Combo1.Text = “sore” Then
List1.AddItem (“16.00”)
List1.AddItem (“16.30”)
List1.AddItem (“17.00”)
Else
List1.AddItem (“19.00”)
List1.AddItem (“19.30”)
List1.AddItem (“20.00”)
End If
End Sub
Private Sub Command3_Click()
If Text6 > 10 Then
Text7 = Val(Text5.Text) * 0.05
ElseIf Text6 > 5 Then
Text7 = Val(Text5.Text) * 0.025
Else
Text7 = 0
End If
Text8 = (Val(Text5.Text) * Val(Text6.Text)) – Val(Text7.Text)
End Sub
Private Sub Command4_Click()
Itanggal = Format(Date, “dd/mm/yyyy”)
Text1 = “”
Text2 = “”
Text3 = “”
Text4 = “”
Text5 = “”
Text6 = “”
Text7 = “”
Text8 = “”
Text9 = “”
Text10 = “”
List1.Clear
Combo1.Text = “”
Combo2.Text = “”
Option1.Value = False
Option2.Value = False
Option3.Value = False
End Sub
Private Sub Command5_Click()
p = MsgBox(“Yakin Anda Akan Keluar”, vbYesNo + 32, “Konfirmasi”)
If p = vbYes Then
Unload Me
End If
End Sub

Private Sub Form_Load()
Itanggal = Format(Date, “dd/mm/yyyy”)
Text1 = “”
Text2 = “”
Text3 = “”
Text4 = “”
Text5 = “”
Text6 = “”
Text7 = “”
Text8 = “”
Text9 = “”
Text10 = “”
List1.Text = “”
Option1.Value = False
Option2.Value = False
Option3.Value = False
Combo1.AddItem (“pagi”)
Combo1.AddItem (“sore”)
Combo1.AddItem (“malam”)
Combo2.AddItem (“Bandung”)
Combo2.AddItem (“Semarang”)
Combo2.AddItem (“Yogya”)
Combo2.AddItem (“Jakarta”)
End Sub
Private Sub Option1_Click()
If Combo1.Text = “pagi” Then
Select Case (Combo2.Text)
Case “Bandung”
Text5 = 60000
Case “Semarang”
Text5 = 50000
Case “Yogya”
Text5 = 45000
Case Else
Text5 = 70000
End Select
ElseIf Combo1.Text = “sore” Then
Select Case (Combo2.Text)
Case “Bandung”
Text5 = 60000
Case “Semarang”
Text5 = 50000
Case “Yogya”
Text5 = 45000
Case Else
Text5 = 70000
End Select
Else
Select Case (Combo2.Text)
Case “Bandung”
Text5 = 60000 + 10000
Case “Semarang”
Text5 = 50000 + 10000
Case “Yogya”
Text5 = 45000 + 10000
Case Else
Text5 = 70000 + 10000
End Select
End If
End Sub
Private Sub Option2_Click()
If Combo1.Text = “pagi” Then
Select Case (Combo2.Text)
Case “Bandung”
Text5 = 75000
Case “Semarang”
Text5 = 65000
Case “Yogya”
Text5 = 55000
Case Else
Text5 = 85000
End Select
ElseIf Combo1.Text = “sore” Then
Select Case (Combo2.Text)
Case “Bandung”
Text5 = 75000
Case “Semarang”
Text5 = 65000
Case “Yogya”
Text5 = 55000
Case Else
Text5 = 85000
End Select
Else
Select Case (Combo2.Text)
Case “Bandung”
Text5 = 75000 + 10000
Case “Semarang”
Text5 = 65000 + 10000
Case “Yogya”
Text5 = 55000 + 10000
Case Else
Text5 = 85000 + 10000
End Select
End If
End Sub

Private Sub Option3_Click()
If Combo1.Text = “pagi” Then
Select Case (Combo2.Text)
Case “Bandung”
Text5 = 90000
Case “Semarang”
Text5 = 80000
Case “Yogya”
Text5 = 70000
Case Else
Text5 = 100000
End Select
ElseIf Combo1.Text = “sore” Then
Select Case (Combo2.Text)
Case “Bandung”
Text5 = 90000
Case “Semarang”
Text5 = 80000
Case “Yogya”
Text5 = 70000
Case Else
Text5 = 100000
End Select
Else
Select Case (Combo2.Text)
Case “Bandung”
Text5 = 90000 + 10000
Case “Semarang”
Text5 = 80000 + 10000
Case “Yogya”
Text5 = 70000 + 10000
Case Else
Text5 = 100000 + 10000
End Select
End If
End Sub
Private Sub Text9_Change()
Text10 = Val(Text9.Text) – Val(Text8.Text)
End Sub

PARA AHLI VB tulunglah di dandakna nek ana sing salah ya..mbok menawa…kie enyong eji sinau vb..ok.matur thankyu.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s