You are on page 1of 2

TUGAS QUIS VISUAL BASIC 6.

1. Desain Form

2. Tampilan Form pada saat RUN


3. Listing Program
a. Source Kode pada Combobox
Private Sub Combo1_Click()
If Combo1.Text = "B216" Then
Text1.Text = "Pilot"
Text3.Text = 1500
End If
If Combo1.Text = "B221" Then
Text1.Text = "Buku"
Text3.Text = 3000
End If
If Combo1.Text = "A121" Then
Text1.Text = "Tas"
Text3.Text = 12000
End If
If Combo1.Text = "A212" Then
Text1.Text = "Map"
Text3.Text = 6000
End If
End Sub

b. Source Kode pada Jumlah


Private Sub Text2_Change()
On Error Resume Next
Text4.Text = Text2.Text * Text3.Text
End Sub

c. Source Kode pada Button Keluar


Private Sub Command1_Click()
End
End Sub

d. Source Kode pada Button Bersih


Private Sub Command2_Click()
Combo1.Text = ""
Text1.Text = ""
Text2.Text = 0
Text3.Text = 0
Text4.Text = 0
Text2.SetFocus
End Sub

You might also like