NEW VB 4

new.jpg

Private Sub cmdadd_Click()

Data1.Recordset.AddNew

End Sub

 

Private Sub cmdcancel_Click()

txtkode.SetFocus

txtkode = “”

txtnb = “”

txthb = “”

txtjb = “”

txtby = “”

txtpot = “”

txttb = “”

Data1.Recordset.Delete

 

End Sub

 

Private Sub cmdhitung_Click()

txtby = Val(txthb) * Val(txtjb)

If txtjb > 5 Then

txtpot = Val(txtby) * 0.02

End If

txttb = Val(txtby) – Val(txtpot)

End Sub

 

Private Sub cmdkeluar_Click()

x = MsgBox(“yakin keluar?”, vbQuestion + vbYesNo, “informasi”)

If x = vbYes Then

End

End If

End Sub

 

Private Sub cmdproses_Click()

Dim A As String

A = Mid(txtkode, 5, 2)

If A = “SP” Then

txtnb = “SPIDOL”

txthb = “9500”

ElseIf A = “BT” Then

txtnb = “BUKU TULIS”

txthb = “12500”

ElseIf A = “TP” Then

txtnb = “TIPE EX”

txthb = “3000”

ElseIf A = “PG” Then

txtnb = “PENGGARIS”

txthb = “25000”

ElseIf A = “PT” Then

txtnb = “PAPAN TULIS”

txthb = “50000”

End If

txtjb.SetFocus

 

End Sub

 

Private Sub cmdsave_Click()

Data1.Recordset.AddNew

End Sub

 

Iklan

NEW VB 3

2

Private Sub cmdbatal_Click()
txtnama.SetFocus
txtnama = “”
txtnpm = “”
txtjur = “”
txtprodi = “”
txttm = “”
txturut = “”
End Sub
Private Sub cmdlagi_Click()
txtnama.SetFocus
txtnama = “”
txtnpm = “”
txtjur = “”
txtprodi = “”
txttm = “”
txturut = “”
End Sub

Private Sub cmdproses_Click()
Dim S As String
txttm.Text = “20” & Left(txtnpm.Text, 2)
S = Mid(txtnpm.Text, 3, 1)
If S = “1” Then
txtjur.Text = “Sistem Informasi”
ElseIf S = “2” Then
txtjur.Text = “Manajemen Informatika”
End If
S = Mid(txtnpm.Text, 5, 2)
If S = “01” Then
txtprodi.Text = “Strata Satu”
ElseIf S = “02” Then
txtprodi.Text = “Diploma Tiga”
End If
txturut.Text = Right(txtnpm.Text, 3)

End Sub
Private Sub txtnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnpm.SetFocus
End If
End Sub
Private Sub cmdadd_Click()
Data1.Recordset.AddNew
txtnama.SetFocus
End Sub

Private Sub cmddelete_Click()
Data1.Recordset.Delete
End Sub
Private Sub cmdsave_Click()
Data1.Recordset.AddNew
End Sub

Private Sub cmdkeluar_Click()
x = MsgBox(“yakin keluar?”, vbQuestion + vbYesNo, “informasi”)
If x = vbYes Then
End
End If
End Sub

NEW VB 2

2.jpg

Private Sub cmdbatal_Click()
txtnama.SetFocus
txtnama = “”
txtnpm = “”
txtjur = “”
txtprodi = “”
txttm = “”
txturut = “”
End Sub
Private Sub cmdlagi_Click()
txtnama.SetFocus
txtnama = “”
txtnpm = “”
txtjur = “”
txtprodi = “”
txttm = “”
txturut = “”
End Sub

Private Sub cmdproses_Click()
Dim S As String
txttm.Text = “20” & Left(txtnpm.Text, 2)
S = Mid(txtnpm.Text, 3, 1)
If S = “1” Then
txtjur.Text = “Sistem Informasi”
ElseIf S = “2” Then
txtjur.Text = “Tekhnik Informatika”
ElseIf S = “3” Then
txtjur.Text = “Manajemn Informatika”
ElseIf S = “4” Then
txtjur.Text = “Komputer Akuntansi”
End If
S = Mid(txtnpm.Text, 4, 2)
If S = “01” Then
txtprodi.Text = “Strata Satu”
ElseIf S = “02” Then
txtprodi.Text = “Diploma Empat”
ElseIf S = “03” Then
txtprodi.Text = “Diploma Tiga”
ElseIf S = “04” Then
txtprodi.Text = “Diploma Dua”
End If
txturut.Text = Right(txtnpm.Text, 3)

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

Private Sub cmdadd_Click()
Data1.Recordset.AddNew
txtnama.SetFocus
End Sub

Private Sub cmddelete_Click()
Data1.Recordset.Delete
End Sub
Private Sub cmdsave_Click()
Data1.Recordset.AddNew
End Sub

Private Sub cmdkeluar_Click()
x = MsgBox(“yakin keluar?”, vbQuestion + vbYesNo, “informasi”)
If x = vbYes Then
End
End If
End Sub

NEW VB 1

1.jpg

Private Sub cbogolongan_Click()
Dim gapok, tunjangan, pajak, total As Variant
Select Case cbogolongan.Text
Case “I”
gapok = 2000000
tunjangan = 200000
Case “II”
gapok = 2500000
tunjangan = 250000
Case “III”
gapok = 3000000
tunjangan = 300000
Case “IV”
gapok = 3500000
tunjangan = 350000
Case Else
gapok = 4000000
tunjangan = 400000
End Select
total = gapok + tunjangan
pajak = total * 0.1
txtgapok.Text = gapok
txttunjangan.Text = tunjangan
txtpajak.Text = pajak
txttotal.Text = total – pajak
End Sub

Private Sub cmdbatal_Click()
txtnidn.SetFocus
txtnidn = “”
txtnama = “”
cbogolongan = “”
txtgapok = “”
txttunjangan = “”
txtpajak = “”
txttotal = “”
End Sub

Private Sub cmdlagi_Click()
txtnidn.SetFocus
txtnidn = “”
txtnama = “”
cbogolongan = “”
txtgapok = “”
txttunjangan = “”
txtpajak = “”
txttotal = “”
End Sub

Private Sub Form_load()
cbogolongan.AddItem “I”
cbogolongan.AddItem “II”
cbogolongan.AddItem “III”
cbogolongan.AddItem “IV”
End Sub
Private Sub txtnidn_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnama.SetFocus
End If
End Sub

Private Sub cmdadd_Click()
Data1.Recordset.AddNew
txtnama.SetFocus
End Sub

Private Sub cmddelete_Click()
Data1.Recordset.Delete
End Sub
Private Sub cmdsave_Click()
Data1.Recordset.AddNew
End Sub

Private Sub cmdkeluar_Click()
x = MsgBox(“yakin keluar?”, vbQuestion + vbYesNo, “informasi”)
If x = vbYes Then
End
End If
End Sub

NEW VB I

i.jpg

Private Sub Cmdprosess_Click()
Dim a, b, c As String
a = Mid(txtnik, 5, 1)
If a = “A” Then
golongan = “A”
jabatan = “MANAJER”
gaji = “4000000”
tunjangan = “1025000”
ElseIf a = “B” Then
golongan = “B”
jabatan = “Ka.Seksi”
gaji = “3500000”
tunjangan = “975000”
ElseIf a = “C” Then
golongan = “C”
jabatan = “staff”
gaji = “3000000”
tunjangan = “925000”
End If
b = Mid(txtnik, 7, 1)
If b = “S” Then
kode = “S”
Status = “Single”
ElseIf b = “M” Then
kode = “M”
Status = “Menikah”
ElseIf b = “J” Then
kode = “J”
Status = “Janda”
ElseIf b = “D” Then
kode = “D”
Status = “Duda”
End If
c = Right(txtnik, 3)
If c = “KEU” Then
bagian = “ACCOUNTING”
ElseIf c = “ADM” Then
bagian = “ADMINISTRASI”
ElseIf c = “SDM” Then
bagian = “GENERAL AFFAIR”
ElseIf c = “EDP” Then
bagian = “IT UNIT”
ElseIf c = “SPM” Then
bagian = “SECURITY”
End If
txttahun = Left(txtnik, 4)
txtgolongan = golongan
txtjabatan = jabatan
txtstatus = Status
txtbagian = bagian
txttunjangan = tunjangan
txtgaji = gaji
txtkode = kode
txttotal = Val(txtgaji) + Val(txttunjangan)
End Sub

Private Sub Cmdlagi_Click()
txtnama.SetFocus
txtnama = “”
txtnik = “”
txtgolongan = “”
txtkode = “”
txtstatus = “”
txttahun = “”
txtjabatan = “”
txtbagian = “”
txtgaji = “”
txttunjangan = “”
txttotal = “”

End Sub

Private Sub cmdbatal_Click()
txtnama.SetFocus
txtnama = “”
txtnik = “”
txtgolongan = “”
txtkode = “”
txtstatus = “”
txttahun = “”
txtjabatan = “”
txtbagian = “”
txtgaji = “”
txttunjangan = “”
txttotal = “”
End Sub

Private Sub txtnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnik.SetFocus
End If
End Sub
Private Sub cmdadd_Click()
Data1.Recordset.AddNew
txtnama.SetFocus
End Sub

Private Sub cmddelete_Click()
Data1.Recordset.Delete
End Sub
Private Sub cmdsave_Click()
Data1.Recordset.AddNew
End Sub

Private Sub cmdkeluar_Click()
x = MsgBox(“yakin keluar?”, vbQuestion + vbYesNo, “informasi”)
If x = vbYes Then
End
End If
End Sub

NEW VB H

h.jpg
Private Sub cbxkk_Click()
Select Case cbxkk.Text
Case “P205”
jenis = “Pentium II 500 Mega Hz”
harga = “1500000”
Case “P308”
jenis = “Pentium III 800 Mega Hz”
harga = “2100000”
Case “P310”
jenis = “Pentium III 1.0 Giga Hz ”
harga = “3500000”
Case “P415”
jenis = “Pentium IV 1.5 Giga Hz”
harga = “4000000”
Case “P417”
jenis = “Pentium IV 1.7 Giga Hz ”
harga = “4200000”
Case “P419”
jenis = “Pentium IV 1.9 Giga Hz”
harga = “5500000”

End Select
txtjj.SetFocus
txtjenis = jenis
txtharga = harga
End Sub

Private Sub cmdclose_Click()
Unload Me
End Sub

Private Sub cmdhitung_Click()
cbxkk = “Pilih Kode”
txtmerk = “”
txtharga = “”
txtjj = “”
txthp = “”
txtdis = “”
txttb = “”
txtjenis = “”
End Sub

Private Sub cmdprosess_Click()
txthp = Val(txtharga) * Val(txtjj)
If txthp > 40000000 Then
txtdis = Val(txthp) * 0.15
ElseIf txthp > 35000000 Then
txtdis = Val(txthp) * 0.1
ElseIf txthp > 30000000 Then
txtdis = Val(txthp) * 0.05
ElseIf txthp > 25000000 Then
txtdis = Val(txthp) * 0.02
End If
txttb = Val(txthp) – Val(txtdis)
End Sub

Private Sub Form_Load()
cbxkk.AddItem “P205”
cbxkk.AddItem “P308”
cbxkk.AddItem “P310”
cbxkk.AddItem “P415”
cbxkk.AddItem “P417”
cbxkk.AddItem “P419”

End Sub

Public Function terbilang(strangka As String, _
Optional matauang As String = “Rupiah”) As String
Dim strjmlhuruf$, intpecahan As Integer
Dim strpecahan$, urai$, bil1$, strtot$, bil2$
Dim x As Integer, y As Integer, z As Integer
On Error GoTo pesan
Dim strvalid As String, huruf As String * 1
Dim i As Integer
strvalid = “1234567890”
For i% = 1 To Len(strangka)
huruf = Chr(Asc(Mid(strangka, i%, 1)))
If InStr(strvalid, huruf) = 0 Then
Set angkaterbilang = Nothing
MsgBox “harus karakter angka”, vbCritical, “Karakter tidak vald”
Exit Function
End If
Next i%
If strangka = “” Then Exit Function
If Len(Trim(strangka)) > 15 Then GoTo pesan
strjmlhuruf = LTrim(strangka)
If (intpecahan = 0) Then
strpecahan = “”
Else
strpecahan = LTrim(Str(intpecahan)) + “/100 ”
End If
x = 0
y = 0
urai = “”
While (x < Len(strjmlhuruf))
x = x + 1
strtot = Mid(strjmlhuruf, x, 1)
y = y + Val(strtot)
z = Len(strjmlhuruf) – x + 1
Select Case Val(strtot)
Case 1
If (z = 1 Or z = 7 Or z = 10 Or z = 13) Then
bil1 = “Satu ”
ElseIf (z = 4) Then
If (x = 1) Then
bil1 = “Se”
Else
bil1 = “Satu ”
End If
ElseIf (z = 2 Or z = 5 Or z = 8 Or z = 11 Or z = 11 Or z = 14) Then
x = x + 1
strtot = Mid(strjmlhuruf, x, 1)
z = Len(strjmlhuruf) – x + 1
bil2 = “”
Select Case Val(strtot)
Case 0: bil1 = “Sepuluh ”
Case 1: bil1 = “Sebelas ”
Case 2: bil1 = “Dua Belas ”
Case 3: bil1 = “Tiga Belas ”
Case 4: bil1 = “Empat Belas ”
Case 5: bil1 = “Lima Belas ”
Case 6: bil1 = “Enam Belas ”
Case 7: bil1 = “Tujuh Belas ”
Case 8: bil1 = “Delapan Belas ”
Case 9: bil1 = “Sembilan Belas ”
End Select
Else
bil1 = “Se”
End If
Case 2: bil1 = “Dua ”
Case 3: bil1 = “Tiga ”
Case 4: bil1 = “Empat ”
Case 5: bil1 = “Lima ”
Case 6: bil1 = “Enam ”
Case 7: bil1 = “Tujuh ”
Case 8: bil1 = “Delapan ”
Case 9: bil1 = “Sembilan ”
Case Else
bil1 = “”
End Select
If (Val(strtot) > 0) Then
If (z = 2 Or z = 5 Or z = 8 Or z = 11 Or z = 14) Then
bil2 = “puluh ”
ElseIf (z = 3 Or z = 6 Or z = 9 Or z = 12 Or z = 15) Then
bil2 = “ratus ”
Else
bil2 = “”
End If
Else
bil2 = “”
End If
If (y > 0) Then
Select Case z
Case 4: bil2 = bil2 + “Ribu ”
y = 0
Case 7: bil2 = bil2 + “Juta ”
y = 0
Case 10: bil2 = bil2 + “Milyar ”
y = 0
Case 12: bil2 = bil2 + “Trilyun ”
y = 0
End Select
End If
urai = urai + bil1 + bil2
Wend
urai = urai + strpecahan
terbilang = (urai & matauang)
Exit Function
pesan:
terbilang = “(maksimal 15 digit)”
End Function
Private Sub cmdadd_Click()
Data1.Recordset.AddNew
cbxkk.SetFocus
End Sub

Private Sub cmddelete_Click()
Data1.Recordset.Delete
End Sub
Private Sub cmdsave_Click()
Data1.Recordset.AddNew
End Sub

Private Sub cmdkeluar_Click()
x = MsgBox(“yakin keluar?”, vbQuestion + vbYesNo, “informasi”)
If x = vbYes Then
End
End If
End Sub

NEW VB G

g.jpg

Private Sub cmdbatal_Click()
Txtnama = “”
txtnpm = “”
txtjurusan = “”
txtstudi = “”
txtmasuk = “”
txtnurut = “”
txtbp = “”
Txtnama.SetFocus
End Sub

Private Sub cmdlagi_Click()
Txtnama = “”
txtnpm = “”
txtjurusan = “”
txtstudi = “”
txtmasuk = “”
txtnurut = “”
txtbp = “”
Txtnama.SetFocus

End Sub

Private Sub cmdproses_Click()
Dim a, b, c As String
a = Mid(txtnpm, 3, 1)
If a = “1” Then
jurusan = “Sistem Informasi”
ElseIf a = “2” Then
jurusan = “tekhnik informatika”
ElseIf a = “3” Then
jurusan = “Manajemen Informatika”
ElseIf a = “4” Then
jurusan = “Manajemen & Komp. Akuntansi”
End If
b = Mid(txtnpm, 4, 2)
If b = “01” Then
studi = “Strata Satu ”
bp = “1950000”
ElseIf b = “02” Then
studi = “Diploma Empat ”
bp = “1750000”
ElseIf b = “03” Then
studi = “Diploma Tiga ”
bp = “1650000”
ElseIf b = “04” Then
studi = “Diploma Dua ”
bp = “1450000”
End If
nurut = Right(txtnpm, 3)
masuk = “20” & Left(txtnpm, 2)

txtnurut = nurut
txtstudi = studi
txtjurusan = jurusan
txtbp = bp
txtmasuk = masuk

End Sub
Private Sub Txtnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnpm.SetFocus
End If
End Sub

Private Sub cmdadd_Click()
Data1.Recordset.AddNew
Txtnama.SetFocus
End Sub

Private Sub cmddelete_Click()
Data1.Recordset.Delete
End Sub
Private Sub cmdsave_Click()
Data1.Recordset.AddNew
End Sub

Private Sub cmdkeluar_Click()
x = MsgBox(“yakin keluar?”, vbQuestion + vbYesNo, “informasi”)
If x = vbYes Then
End
End If
End Sub

NEW VB F

f.jpg

Private Sub cbxkk_Click()
Select Case cbxkk.Text
Case “P205”
jenis = “Pentium II 500 Mega Hz”
harga = “1500000”
Case “P308”
jenis = “Pentium III 800 Mega Hz”
harga = “2100000”
Case “P310”
jenis = “Pentium III 1.0 Giga Hz ”
harga = “3500000”
Case “P415”
jenis = “Pentium IV 1.5 Giga Hz”
harga = “4000000”
Case “P417”
jenis = “Pentium IV 1.7 Giga Hz ”
harga = “4200000”
Case “P419”
jenis = “Pentium IV 1.9 Giga Hz”
harga = “5500000”

End Select
txtjj.SetFocus
txtjenis = jenis
txtharga = harga
End Sub

Private Sub cmdhitung_Click()
cbxkk = “Pilih Kode”
txtmerk = “”
txtharga = “”
txtjj = “”
txthp = “”
txtdis = “”
txttb = “”
txtjenis = “”
End Sub

Private Sub cmdprosess_Click()
txthp = Val(txtharga) * Val(txtjj)
If txthp > 40000000 Then
txtdis = Val(txthp) * 0.15
ElseIf txthp > 35000000 Then
txtdis = Val(txthp) * 0.1
ElseIf txthp > 30000000 Then
txtdis = Val(txthp) * 0.05
ElseIf txthp > 25000000 Then
txtdis = Val(txthp) * 0.02
End If
txttb = Val(txthp) – Val(txtdis)
End Sub

Private Sub Form_Load()
cbxkk.AddItem “P205”
cbxkk.AddItem “P308”
cbxkk.AddItem “P310”
cbxkk.AddItem “P415”
cbxkk.AddItem “P417”
cbxkk.AddItem “P419”

End Sub

Private Sub cmdadd_Click()
Data1.Recordset.AddNew
cbxkk.SetFocus
End Sub

Private Sub cmddelete_Click()
Data1.Recordset.Delete
End Sub
Private Sub cmdsave_Click()
Data1.Recordset.AddNew
End Sub

Private Sub cmdkeluar_Click()
x = MsgBox(“yakin keluar?”, vbQuestion + vbYesNo, “informasi”)
If x = vbYes Then
End
End If
End Sub

NEW VB E

e.jpg

Private Sub cmdkeluar_Click()
x = MsgBox(“yakin keluar?”, vbQuestion + vbYesNo, “informasi”)
If x = vbYes Then
End
End If
End Sub

Private Sub cmdlg_Click()
cbxkb.SetFocus
Txtjb = “”
Txtp = “”
Txttahun = “”
Txtpenerbit = “”
Txthg = “”
End Sub

Private Sub cmdproses_Click()
Dim A, B, C As String
A = Right(Txtkb, 1)
If A = “A” Then
penerbit = “Andi Offset Yogyakarta”
ElseIf A = “I” Then
penerbit = “Indah Surabaya”
ElseIf A = “S” Then
penerbit = “Salemba Empat”
ElseIf A = “E” Then
penerbit = “Elek Media Komputindo”
ElseIf A = “M” Then
penerbit = “Maxicom”
End If
B = Left(Txtkb, 3)
If B = “SIM” Then
jb = “Sistem Informasi Manajemen”
p = “Andra Setiawan”
harga = “75900”
ElseIf B = “EDP” Then
jb = “Elektronik Data Processing”
p = “Desi Istiqomah”
harga = “62000”
ElseIf B = “MNJ” Then
jb = “Manajemen”
p = “Sandy Fitrajaya”
harga = “42000”
ElseIf B = “CDR” Then
jb = “Corel Draw”
p = “Tri Indah Sari”
harga = “53000”
ElseIf B = “RPL” Then
jb = “Rekayasa Perangkat Lunak”
p = “Winda Erlianti”
harga = “83000”
End If
tahun = “20” & Mid(Txtkb, 5, 2)

Txtkb = kb
Txtjb = jb
Txtp = p
Txttahun = tahun
Txtpenerbit = penerbit
Txthg = harga
End Sub
Private Sub cmdadd_Click()
Data1.Recordset.AddNew
Txtkb.SetFocus
End Sub

Private Sub cmddelete_Click()
Data1.Recordset.Delete
End Sub
Private Sub cmdsave_Click()
Data1.Recordset.AddNew
End Sub

NEW VB D

d.jpg

Private Sub cmdlg_Click()
cbxkb.SetFocus
Txtjb = “”
Txtp = “”
Txttahun = “”
Txtpenerbit = “”
txthg = “”
End Sub

Private Sub cmdproses_Click()
Dim A, B, C As String
A = Left(cbxkb, 1)
If A = “A” Then
penerbit = “Andi Offset Yogyakarta”
ElseIf A = “I” Then
penerbit = “Indah Surabaya”
ElseIf A = “S” Then
penerbit = “Salemba Empat”
ElseIf A = “E” Then
penerbit = “Elek Media Komputindo”
ElseIf A = “M” Then
penerbit = “Maxicom”
End If
B = Mid(cbxkb, 3, 3)
If B = “SIM” Then
jb = “Sistem Informasi Manajemen”
p = “Andra Setiawan”
harga = “75900”
ElseIf B = “EDP” Then
jb = “Elektronik Data Processing”
p = “Desi Istiqomah”
harga = “62000”
ElseIf B = “MNJ” Then
jb = “Manajemen”
p = “Sandy Fitrajaya”
harga = “42000”
ElseIf B = “CDR” Then
jb = “Corel Draw”
p = “Tri Indah Sari”
harga = “53000”
End If
tahun = “20” & Right(cbxkb, 2)

cbxkb = kb
Txtjb = jb
Txtp = p
Txttahun = tahun
Txtpenerbit = penerbit
Txtharga = harga
End Sub

Private Sub Form_Load()
cbxkb.AddItem “A-SIM-01”
cbxkb.AddItem “A-EDP-02”
cbxkb.AddItem “I-EDP-03”
End Sub

Private Sub cmdadd_Click()
Data1.Recordset.AddNew
cbxkb.SetFocus
End Sub

Private Sub cmddelete_Click()
Data1.Recordset.Delete
End Sub
Private Sub cmdsave_Click()
Data1.Recordset.AddNew
End Sub

Private Sub cmdkeluar_Click()
x = MsgBox(“yakin keluar?”, vbQuestion + vbYesNo, “informasi”)
If x = vbYes Then
End
End If
End Sub