Kaskus

Tech

wakienkAvatar border
TS
wakienk
program sederhana (vb 6)
Sprogram sederhana (vb 6)aya mau tanya,,nih di bawah ada kodingan n screenshot program sederhana saya..
saya mau ketika data nama mobil/qty blm di proses(langsung klik command input) ada msgbox terlampir di kodingannya(please check)..yg variabel x juga muncul setelah variabel y..saya maunya salah satunya aja gitu..hehe
trus yg kedua..yg pas di textbox "diskon" cara ngebalikin jadi 0 lg gimana yaa setelah saya input??
tlg dijawab untuk yg tau..makasih..

Private Sub Command1_Click()
y = MsgBox("Silahkan Lakukan Proses Terlebih Dahulu...", vbOKOnly, "WARNING!!")
x = MsgBox("Anda Berhasil Input Penjualan...", vbOKOnly, "Informasi")
x = vbOK
z = MsgBox("Mau Input Lagi?", vbQuestion + vbOKCancel, "Question")
If z = vbOK Then
Text1.Text = ""
Text2.Text = ""
Text3.Text = 0
Text5.Text = 0
Text1.SetFocus
End If
End Sub

Private Sub Command2_Click()
y = MsgBox("Apakah Anda Ingin Keluar?", vbQuestion + vbOKCancel, "KONFIRMASI")
If y = vbOK Then
End
End If
End Sub

Private Sub Command3_Click()
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text3 = Val(Tex3t)
Text4 = Val(Text4)
Text5 = Text3 - Text4
End Sub

Private Sub Form_Activate()
Text3.Enabled = False
Text4.Enabled = False
Text5.Enabled = False
Text1.SetFocus
End Sub

Private Sub Text3_Change()
If Text1.Text = "toyota" Then
Text3.Text = Val(Text2) * 100000
ElseIf Text1.Text = "daihatsu" Then
Text3.Text = Val(Text2) * 90000
ElseIf Text1.Text = "nissan" Then
Text3.Text = Val(Text2) * 120000
Else
Text3.Text = Val(Text2) * 150000
End If
End Sub

Private Sub Text4_Change()
If Text2 < 2 Then
Text4 = 0
Else
If Text2 >= 2 Or Text2 <= 3 Then
Text4 = 0.15 * Text3
Else
Text4 = 0.3 * Text3
End If
End If
End Sub
0
1.4K
6
GuestAvatar border
Komentar yang asik ya
Urutan
Terbaru
Terlama
GuestAvatar border
Komentar yang asik ya
Komunitas Pilihan