Tugas Data Base

Siti Data Base

Private Sub Cmdcancel_Click()

Data1.Recordset.Delete

Txtnama.SetFocus

End Sub

 

Private Sub Cmdexit_Click()

Unload Me

End Sub

 

Private Sub Cmdnew_Click()

Data1.Recordset.AddNew

End Sub

 

Private Sub Cmdproses_Click()

Dim jurusan, study As String

Dim th, no As Currency

th = “20″ & Left(Txtnpm.Text, 2)

Txtth.Text = th

jurusan = Mid(Txtnpm.Text, 3, 1)

If jurusan = “1″ Then

jurusan = “Sistem Informasi”

ElseIf jurusan = “2″ Then

jurusan = “Manajemen Informatika”

ElseIf jurusan = “3″ Then

jurusan = “Teknik Informatika”

ElseIf jurusan = “4″ Then

jurusan = “Manajemen & Komp.Akutansi”

End If

Txtjurusan.Text = jurusan

study = Mid(Txtnpm.Text, 4, 2)

If study = “01″ Then

study = “Strata Satu”

ElseIf study = “02″ Then

study = “Diploma Empat”

ElseIf study = “03″ Then

study = “Diploma Tiga”

ElseIf study = “04″ Then

study = “Diploma Dua”

End If

Txtstudi.Text = study

no = Right(Txtnpm, 3)

Txtno.Text = no

End Sub

 

Private Sub Cmdsave_Click()

Data1.Recordset.Update

End Sub

 

Private Sub Txtnama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txtnpm.SetFocus

End If

End Sub

Tugas VB Siti Kholifah

SITI KHOLIFAHPrivate Sub cmdBatal_Click()
txtnama.Text = “”
txtNpm.Text = “”
TxtKlas.Text = “”
txtJurusan.Text = “”
txtProdi.Text = “”
txtTh.Text = “”
txtNo.Text = “”
txtUp.Text = “”
txtBp.Text = “”
txtUb.Text = “”
txtBpa.Text = “”
txtTotal.Text = “”
txtnama.SetFocus
End Sub
Private Sub cmdKeluar_Click()
End
End Sub
Private Sub cmdLagi_Click()
txtnama.Text = “”
txtNpm.Text = “”
TxtKlas.Text = “”
txtJurusan.Text = “”
txtProdi.Text = “”
txtTh.Text = “”
txtNo.Text = “”
txtUp.Text = “”
txtBp.Text = “”
txtUb.Text = “”
txtBpa.Text = “”
txtTotal.Text = “”
txtnama.SetFocus
End Sub
Private Sub cmdProses_Click()
Dim NPM As String
NPM = Left(txtNpm.Text, 1)
If NPM = “E” Or NPM = “e” Then
TxtKlas.Text = “Eksekutif”
txtUb.Text = “1250000”
ElseIf NPM = “R” Or NPM = “r” Then
TxtKlas.Text = “Reguler”
txtUb.Text = “1000000”
End If
NPM = Mid(txtNpm.Text, 5, 1)
If NPM = 1 Then
txtJurusan.Text = “Sistem Informasi”
ElseIf NPM = 2 Then
txtJurusan.Text = “Manajemen Informatika”
ElseIf NPM = 3 Then
txtJurusan.Text = “Manajemen Komp. Akuntansi”
End If
NPM = Mid(txtNpm.Text, 7, 1)
If NPM = “1” Then
txtProdi.Text = “Strata Satu”
txtUp.Text = “200000”
ElseIf NPM = “2” Then
txtProdi.Text = “Diploma Tiga”
txtUp.Text = “150000”
ElseIf NPM = “3” Then
txtProdi.Text = “Diploma Satu”
txtUp.Text = “150000”
End If
NPM = Mid(txtNpm.Text, 3, 2)
txtTh.Text = “20” & NPM
NPM = Right(txtNpm.Text, 3)
txtNo.Text = NPM
If TxtKlas.Text = “Eksekutif” And txtProdi.Text = “Strata Satu” Then
txtBp.Text = “1900000”
ElseIf TxtKlas.Text = “Eksekutif” And txtProdi.Text = “Diploma Tiga” Then
txtBp.Text = “1650000”
ElseIf TxtKlas.Text = “Eksekutif” And txtProdi.Text = “Diploma Satu” Then
txtBp.Text = “1350000”
End If
If TxtKlas.Text = “Reguler” And txtProdi.Text = “Strata Satu” Then
txtBp.Text = “1500000”
ElseIf TxtKlas.Text = “Reguler” And txtProdi.Text = “Diploma Satu” Then
txtBp.Text = “1250000”
ElseIf TxtKlas.Text = “Reguler” And txtProdi.Text = “Diploma Tiga” Then
txtBp.Text = “1250000”
End If
If TxtKlas.Text = “Reguler” Or TxtKlas.Text = “Eksekutif” Then
txtBpa.Text = “600000”
End If
txtTotal.Text = Val(txtUp.Text) + Val(txtBp.Text) + Val(txtUb.Text) + Val(txtBpa.Text)
End Sub

Private Sub txtnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtNpm.SetFocus
End If
End Sub

SITI 1 PENJUALAN SITI 2 PENJUALAN

Private Sub cbokode_Click()

Dim MERK As String

Dim HS As Currency

Select Case cbokode.Text

Case “Aplee MC965 MacBook Air”

txtmerk.Text = “Apple MacBook Air MC965”

txths.Text = “12800000”

Case “Aplee MC966 MacBok Air”

txtmerk.Text = “Apple MacBook Air MC966”

txths.Text = “15000000”

Case “Apple MC968 MacBook Air”

txtmerk.Text = “Apple MacBook Air MC968”

txths.Text = “9900000”

Case “Apple MC969 MacBook Air”

txtmerk.Text = “Apple MacBook Air MC969”

txths.Text = “11900000”

Case “Apple MC700 MacBook Pro”

txtmerk.Text = “Apple MacBook Pro MC700”

txths.Text = “10800000”

Case “Apple MC723 MacBook Pro”

txtmerk.Text = “Apple MacBook Pro MC721”

txths.Text = “15900000”

Case “Apple MC724 MacBook Pro”

txtmerk.Text = “Apple MacBook Pro MC724”

txths.Text = “19300000”

Case “Apple MC311 MacBook Pro”

txtmerk.Text = “Apple MacBook Pro MC311”

txths.Text = “24200000”

Case “Apple MC314 MacBook Pro”

txtmerk.Text = “Apple MacBook Pro MC314”

txths.Text = “14700000”

Case “Apple MC318 MacBook Pro”

txtmerk.Text = “APPLE MACBOOK PRO MC318”

txths.Text = “17600000”

Case “Apple MC313 MacBook Pro”

txtmerk.Text = “APPLE MACBOOK PRO MC313”

txths.Text = “19300000”

Case “APPLE MD322 MacBook Pro”

txtmerk.Text = “APPLE MACBOOK PRO MD322”

txths.Text = “21000000”

Case “APPLE MD965 MacBook Pro”

txtmerk.Text = “APPLE MACBOOK PRO MD965”

txths.Text = “12800000”

End Select

txtjj.SetFocus

End Sub

 

Private Sub cmdkeluar_Click()

Unload Me

End Sub

 

Private Sub cmdlagi_Click()

cbokode.SetFocus

cbokode.Text = “”

txtmerk.Text = “”

txths.Text = “”

txtjj.Text = “”

txthp.Text = “”

txtdis.Text = “”

txttb.Text = “”

txtterbilang.Text = “”

End Sub

 

Private Sub cmdproses_Click()

txthp.Text = Val(txtjj.Text) * Val(txths.Text)

If txthp.Text > 140000000 Then

txtdis.Text = Val(txthp.Text) * 0.15

ElseIf txthp.Text > 135000000 Then

txtdis.Text = Val(txthp.Text) * 0.1

ElseIf txthp.Text > 130000000 Then

txtdis.Text = Val(txthp.Text) * 0.5

ElseIf txthp.Text > 125000000 Then

txtdis.Text = Val(txthp.Text) * 0.2

End If

txttb.Text = Val(txthp.Text) – Val(txtdis.Text)

End Sub

 

Private Sub Form_Load()

cbokode.AddItem “Aplee MC965 MacBook Air”

cbokode.AddItem “Aplee MC966 MacBok Air”

cbokode.AddItem “Apple MC968 MacBook Air”

cbokode.AddItem “Apple MC969 MacBook Air”

cbokode.AddItem “Apple MC700 MacBook Pro”

cbokode.AddItem “Apple MC723 MacBook Pro”

cbokode.AddItem “Apple MC724 MacBook Pro”

cbokode.AddItem “Apple MC311 MacBook Pro”

cbokode.AddItem “Apple MC314 MacBook Pro”

cbokode.AddItem “Apple MC318 MacBook Pro”

cbokode.AddItem “Apple MC313 MacBook Pro”

cbokode.AddItem “APPLE MD322 MacBook Pro”

cbokode.AddItem “APPLE MD965 MacBook Pro”

End Sub

siti 1 SITI2

Private Sub CMDBATAL_Click()

TXTINPUT.SetFocus

TXTINPUT.Text = “”

TXTNIK.Text = “”

End Sub

 

Private Sub CMDEXIT_Click()

Unload Me

End Sub

 

Private Sub CMDLAGI_Click()

TXTINPUT.SetFocus

TXTGOLONGAN.Text = “”

TXTJABATAN.Text = “”

TXTTUNJANGAN.Text = “”

TXTGAPOK.Text = “”

TXTTOGA.Text = “”

TXTNIK.Text = “”

TXTTERBILANG.Text = “”

TXTBAGIAN.Text = “”

TXTTAHUN.Text = “”

TXTKODE.Text = “”

TXTSTATUS.Text = “”

End Sub

 

Private Sub CMDPROSES_Click()

Dim NIK As String

NIK = Mid(TXTNIK.Text, 5, 1)

If NIK = “A” Then

TXTGOLONGAN = “A”

TXTJABATAN = “MANAJER”

TXTTUNJANGAN = “1025000”

TXTGAPOK = “4000000”

ElseIf NIK = “B” Then

TXTGOLONGAN = “B”

TXTJABATAN = “KA SEKSI”

TXTTUNJANGAN = “975000”

TXTGAPOK = “3500000”

ElseIf NIK = “C” Then

TXTGOLONGAN = “C”

TXTJABATAN = “STAFF”

TXTTUNJANGAN = “925000”

TXTGAPOK = “3000000”

End If

TXTTOGA = Val(TXTGAPOK.Text) + Val(TXTTUNJANGAN.Text)

NIK = Left(TXTNIK.Text, 4)

TXTTAHUN.Text = NIK

NIK = Mid(TXTNIK.Text, 9, 3)

If NIK = “KEU” Then

TXTBAGIAN = “ACCOUNTING”

ElseIf NIK = “ADM” Then

TXTBAGIAN = “ADMINISTRASI”

ElseIf NIK = “SDM” Then

TXTBAGIAN = “GENERAL AFFAIR”

ElseIf NIK = “EDP” Then

TXTBAGIAN = “IT UNIT”

ElseIf NIK = “SPM” Then

TXTBAGIAN = “SECURITY”

End If

NIK = Mid(TXTNIK.Text, 7, 1)

If NIK = “S” Then

TXTKODE = “S”

TXTSTATUS = “SINGLE”

ElseIf NIK = “M” Then

TXTKODE = “M”

TXTSTATUS = “MENIKAH”

ElseIf NIK = “D” Then

TXTKODE = “D”

TXTSTATUS = “DUDA”

ElseIf NIK = “J” Then

TXTKODE = “J”

TXTSTATUS = “JANDA”

End If

End Sub

 

 

 

 

Private Sub TXTTOGA_Change()

TXTTERBILANG.Text = terbilang(Val(TXTTOGA.Text))

End Sub

Private Function KeKata(Nomor)

TrjKata = Array(“”, “satu”, “dua”, “tiga”, “empat”, “lima”, “enam”, “tujuh”, “delapan”, “sembilan”)

KeKata = TrjKata(Nomor)

End Function

Public Function terbilang(Nilai_Angka, Optional Style = 4, Optional Satuan = “”)

Angka = Fix(Abs(Nilai_Angka))

des1 = Mid(Abs(Nilai_Angka), Len(Angka) + 2, 1)

des2 = Mid(Abs(Nilai_Angka), Len(Angka) + 3, 1)

If des2 = “” Then

If des1 = “” Or des1 = “0” Then

Koma = “”

Else

Koma = “koma” & KeKata(des1)

End If

ElseIf des2 = “0” Then

If des1 = “0” Then

Koma = “”

ElseIf des1 = “1” Then

Koma = “koma sepuluh”

Else

Koma = “koma” & KeKata(des1) & “puluh”

End If

Else

If des1 = “0” Then

Koma = “koma nol” & KeKata(des2)

ElseIf des1 = “1” Then

If des2 = “1” Then

Koma = “koma sebelas”

Else

Koma = “koma” & KeKata(des2) & “belas”

End If

Else

Koma = “koma” & KeKata(des1) & “puluh” & KeKata(des2)

End If

End If

No1 = Left(Right(Angka, 1), 1)

No2 = Left(Right(Angka, 2), 1)

No3 = Left(Right(Angka, 3), 1)

No4 = Left(Right(Angka, 4), 1)

No5 = Left(Right(Angka, 5), 1)

No6 = Left(Right(Angka, 6), 1)

No7 = Left(Right(Angka, 7), 1)

No8 = Left(Right(Angka, 8), 1)

No9 = Left(Right(Angka, 9), 1)

No10 = Left(Right(Angka, 10), 1)

No11 = Left(Right(Angka, 11), 1)

No12 = Left(Right(Angka, 12), 1)

No13 = Left(Right(Angka, 13), 1)

No14 = Left(Right(Angka, 14), 1)

No15 = Left(Right(Angka, 15), 1)

If Len(Angka) >= 1 Then

If Len(Angka) = 1 And No1 = 1 Then

Nomor1 = “satu”

ElseIf Len(Angka) = 1 And No1 = 0 Then

Nomor1 = “Nol”

ElseIf No2 = “1” Then

If No1 = “1” Then

Nomor1 = “sebelas”

ElseIf No1 = “0” Then

Nomor1 = “sepuluh”

Else

Nomor1 = KeKata(No1) & “belas”

End If

Else

Nomor1 = KeKata(No1)

End If

Else

Nomor1 = “”

End If

If Len(Angka) >= 2 Then

If No2 = 1 Or No2 = “0” Then

Nomor2 = “”

Else

Nomor2 = KeKata(No2) & “puluh”

End If

Else

Nomor2 = “”

End If

If Len(Angka) >= 3 Then

If No3 = “1” Then

Nomor3 = “seratus”

ElseIf No3 = “0” Then

Nomor3 = “”

Else

Nomor3 = KeKata(No3) & “ratus”

End If

Else

Nomor3 = “”

End If

If Len(Angka) >= 4 Then

If No6 = “0” And No5 = “0” And No4 = “0” Then

Nomor4 = “”

ElseIf (No4 = “1” And Len(Angka) = 4) Or (No6 = “0” And No5 = “0” And No4 = “1”) Then

 

Nomor4 = “seribu ”

ElseIf No5 = “1” Then

If No4 = “1” Then

Nomor4 = “sebelas ribu”

ElseIf No4 = “0” Then

Nomor4 = “sepuluh ribu”

Else

Nomor4 = KeKata(No4) & “belas ribu”

End If

Else

Nomor4 = KeKata(No4) & “ribu”

End If

Else

Nomor4 = “”

End If

If Len(Angka) >= 5 Then

If No5 = “1” Or No5 = “0” Then

Nomor5 = “”

Else

Nomor5 = KeKata(No5) & “puluh”

End If

Else

Nomor5 = “”

End If

If Len(Angka) >= 6 Then

If No6 = “1” Then

Nomor6 = “seratus”

ElseIf No6 = “0” Then

Nomor6 = “”

Else

Nomor6 = KeKata(No6) & “ratus”

End If

Else

Nomor6 = “”

End If

If Len(Angka) >= 7 Then

If No9 = “0” And No8 = “0” And No7 = “0” Then

Nomor7 = “”

ElseIf No7 = “1” And Len(Angka) = 7 Then

Nomor7 = “satujuta”

ElseIf No8 = “1” Then

If No7 = “1” Then

Nomor7 = “sebelas juta”

ElseIf No7 = “0” Then

Nomor7 = “sepuluh juta”

Else

Nomor7 = KeKata(No7) & “belas juta”

End If

Else

Nomor7 = KeKata(No7) & “juta”

End If

Else

Nomor7 = “”

End If

If Len(Angka) >= 8 Then

If No8 = “1” Or No8 = “0” Then

Nomor8 = “”

Else

Nomor8 = KeKata(No8) & “puluh”

End If

Else

Nomor8 = “”

End If

If Len(Angka) >= 9 Then

If No9 = “1” Then

Nomor9 = “seratus”

ElseIf No9 = “0” Then

Nomor9 = “”

Else

Nomor9 = KeKata(No9) & “ratus”

End If

Else

Nomor9 = “”

End If

If Len(Angka) >= 10 Then

If No12 = “0” And No11 = “0” And No10 = “0” Then

Nomor10 = “”

ElseIf No10 = “1” And Len(Angka) = 10 Then

Nomor10 = “satu milyar”

ElseIf No11 = “1” Then

If No10 = “1” Then

Nomor10 = “sebelas milyar”

ElseIf No10 = “0” Then

Nomor10 = “sepuluh milyar”

Else

Nomor10 = KeKata(No10) & “belas milyar”

End If

Else

Nomor10 = KeKata(No10) & “milyar”

End If

Else

Nomor10 = “”

End If

If Len(Angka) >= 11 Then

If No11 = “1” Or No11 = “0” Then

Nomor11 = “”

Else

Nomor11 = KeKata(No11) & “puluh”

End If

Else

Nomor11 = “”

End If

If Len(Angka) >= 12 Then

If No12 = “1” Then

Nomor12 = “seratus”

ElseIf No12 = “0” Then

Nomor12 = “”

Else

Nomor12 = KeKata(No12) & “ratus”

End If

Else

Nomor12 = “”

End If

If Len(Angka) >= 13 Then

If No15 = “0” And No14 = “0” And No13 = “0” Then

Nomor13 = “”

ElseIf No13 = “1” And Len(Angka) = 13 Then

Nomor13 = “satu triliun”

ElseIf No14 = “1” Then

If No13 = “1” Then

Nomor13 = “sebelas triliun”

ElseIf No13 = “0” Then

Nomor13 = “sepuluh triliun”

Else

Nomor13 = KeKata(No13) & “belas triliun”

End If

Else

Nomor13 = KeKata(No13) & “triliun”

End If

Else

Nomor13 = “”

End If

If Len(Angka) >= 14 Then

If No14 = “1” Or No14 = “0” Then

Nomor14 = “”

Else

Nomor14 = KeKata(No14) & “puluh”

End If

Else

Nomor14 = “”

End If

If Len(Angka) >= 15 Then

If No15 = “1” Then

Nomor15 = “seratus”

ElseIf No15 = “0” Then

Nomor15 = “”

Else

Nomor15 = KeKata(No15) & “ratus”

End If

Else

Nomor15 = “”

End If

If Len(Angka) >= 15 Then

bilang = “Digit Angka Terlalu Banyak”

Else

If IsNull(Nilai_Angka) Then

bilang = “”

ElseIf Nilai_Angka <= 0 Then

bilang = “minus” & Trim(Nomor15 & Nomor14 & Nomor13 & Nomor12 & Nomor11 & Nomor10 & Nomor9 & Nomor8 & Nomor7 _

& Nomor6 & Nomor5 & Nomor4 & Nomor3 & Nomor2 & Nomor1 & Koma & “” & Satuan)

Else

bilang = Trim(Nomor15 & Nomor14 & Nomor13 & Nomor12 & Nomor11 & Nomor10 & Nomor9 & Nomor8 & Nomor7 _

& Nomor6 & Nomor5 & Nomor4 & Nomor3 & Nomor2 & Nomor1 & Koma & “” & Satuan)

End If

End If

If Style = 4 Then

terbilang = StrConv(Left(bilang, 1), 1) & StrConv(Mid(bilang, 2, 1000), 2)

Else

terbilang = StrConv(bilang, Style)

End If

terbilang = Replace(terbilang, ” “, ” “, 1, 1000, vbTextCompare)

End Function

siti kereta1 SITI KERETA 2

Private Sub CMDKELUAR_Click()

Unload Me

End Sub

 

Private Sub CMDLAGI_Click()

TXTKT.SetFocus

TXTKT.Text = “”

TXTHT.Text = “”

TXTJK.Text = “”

TXTJB.Text = “”

TXTJT.Text = “”

TXTTP.Text = “”

 

End Sub

 

Private Sub CMDPROSES_Click()

Dim KT As String

 

KT = Left(TXTKT.Text, 3)

If KT = “BIM” Then

TXTHT.Text = 50000

TXTJK.Text = “BIMA”

TXTJB.Text = “16.00”

 

ElseIf KT = “EKO” Then

TXTHT.Text = 35000

TXTJK.Text = “EKONOMI”

TXTJB.Text = “19.00”

 

ElseIf KT = “MUT” Then

TXTHT.Text = 23000

TXTJK.Text = “MUTIARA”

TXTJB.Text = “17.00”

 

ElseIf KT = “SEN” Then

TXTHT.Text = 15000

TXTJK.Text = “SENJA”

TXTJB.Text = “20.00”

End If

TXTJT.SetFocus

 

End Sub

 

Private Sub TXTJT_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

TXTTP = Val(TXTHT.Text) * Val(TXTJT.Text)

End If

 

 

End Sub

SITI TOKO SITI TOKO2
Private Sub CMDLAGI_Click()
TXTKODE.SetFocus
TXTKODE.Text = “”
TXTNAMA.Text = “”
TXTHARGA.Text = “”
TXTJUMLAH.Text = “”
TXTTOBA.Text = “”
End Sub

Private Sub CMDBATAL_Click()
TXTKODE.Text = “”
TXTNAMA.Text = “”
TXTHARGA.Text = “”
TXTJUMLAH.Text = “”
TXTTOBA.Text = “”
End Sub
Private Sub CMDKELUAR_Click()
Unload Me
End Sub

Private Sub TXTJUMLAH_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TXTTOBA.Text = Val(TXTHARGA.Text) * (TXTJUMLAH.Text)
End If
End Sub

Private Sub TXTKODE_Change()
If TXTKODE.Text = “A” Then
TXTNAMA.Text = “APEL”
ElseIf TXTKODE.Text = “S” Then
TXTNAMA.Text = “SEMANGKA”
ElseIf TXTKODE.Text = “J” Then
TXTNAMA.Text = “JERUK”
End If
End Sub

Private Sub TxtKODE_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TXTHARGA.SetFocus
End If
End Sub

Private Sub TxtNAMA_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TXTHARGA.SetFocus
End If
End Sub
Private Sub TxtHARGA_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TXTJUMLAH.SetFocus
End If
End Sub

SITI DATA SITI DATA 2Private Sub CMDBATAL_Click()
TXTNPM = “”
TXTNAMA = “”
TXTPROGRAM = “”
TXTJURUSAN = “”
TXTSEMESTER = “”
End Sub

Private Sub CMDKELUAR_Click()
Unload Me
End Sub

Private Sub CMDLAGI_Click()
TXTNPM.SetFocus
TXTNPM = “”
TXTNAMA = “”
TXTPROGRAM = “”
TXTJURUSAN = “”
TXTSEMESTER = “”
End Sub

Private Sub TXTJURUSAN_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TXTSEMESTER.SetFocus
End If
End Sub

Private Sub TXTNAMA_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TXTPROGRAM.SetFocus
End If
End Sub

Private Sub TXTNPM_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TXTNAMA.SetFocus
End If
End Sub

Private Sub TXTPROGRAM_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TXTJURUSAN.SetFocus
End If
End Sub
Private Sub TXTPSEMESTER_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
End If
End Sub

siti 3 siti 4

KODE

Private Sub cdmkeluar_Click()

Unload Me

End Sub

 

Private Sub cmdproses_Click()

txtD.Text = Val(txtA.Text) + Val(txtB.Text) + Val(txtC.Text)

txtE.Text = Val(txtD.Text) * (0.1)

txtF.Text = Val(txtD.Text) – Val(txtE.Text)

End Sub

 

Private Sub cmdulang_Click()

Combo1.SetFocus

Combo1.Text = “SILAHKAN KLIK DISINI”

txtA = “”

txtB = “”

txtC = “”

txtD = “”

txtE = “”

txtF = “”

End Sub

 

Private Sub Combo1_Click()

Select Case Combo1.Text

Case “A”

gapok = 1200000

tunjangan = 200000

Case “B”

gapok = 1000000

tunjangan = 150000

Case “C”

gapok = 800000

tunjangan = 100000

End Select

txtA.Text = gapok

txtB.Text = tunjangan

txtC.SetFocus

End Sub

 

Private Sub Form_Activate()

Combo1.SetFocus

txtA = “”

txtB = “”

txtC = “”

txtD = “”

txtE = “”

txtF = “”

End Sub

 

Private Sub Form_Load()

txtA = “”

txtB = “”

txtC = “”

txtD = “”

txtE = “”

txtF = “”

Combo1.AddItem “A”

Combo1.AddItem “B”

Combo1.AddItem “C”

End Sub

 

 

Private Sub txtC_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtD.Text = Val(txtA.Text) + Val(txtB.Text) – Val(txtC.Text)

txtE.Text = Val(txtD.Text) * (0.1)

txtF.Text = Val(txtD.Text) – Val(txtE.Text)

End If

End Sub

siti 2

Private Sub Command1_Click()

Dim A, B, C, D As Double

Text3.Text = Val(Text1.Text) + Val(Text2.Text)

End Sub

Private Sub Command2_Click()

Text3.Text = Val(Text1.Text) – Val(Text2.Text)

End Sub

Private Sub Command3_Click()

Text3.Text = Val(Text1.Text) * Val(Text2.Text)

End Sub

Private Sub Command4_Click()

Text3.Text = Val(VAL1.Text) / Val(Text2.Text)

End Sub

Private Sub Command5_Click()

Text1 = “”

Text2 = “”

Text3 = “”

End Sub

Private Sub Command6_Click()

End

End Sub

Private Sub Text1_Change()

End Sub

siti

Private Sub CMDHITUNG_Click()

Dim A, B, C As Double

TXTB.Text = Val(TXTA.Text) * 0.1

TXTC.Text = Val(TXTA.Text) – Val(TXTB.Text)

End Sub

Private Sub CMDQUIT_Click()

End

End Sub

Private Sub CMDULANG_Click()

TXTA = “”

TXTB = “”

TXTC = “”

End Sub