NEW VB

nanda baru

 

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 I

nanda i

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

 
nanda h

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

nanda g

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

nanda f

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

nanda ePrivate 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

nanda d

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

NEW VB C

nanda c

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

Private Sub cmdclose_Click()
Unload Me
End Sub

Private Sub cmdhitung_Click()
cbxkk = “Pilih kode”
txtjk = “”
txths = “”
txtjj = “”
txthp = “”
txtdis = “”
txthb = “”

End Sub

Private Sub cmdprosess_Click()
txthp = Val(txths) * Val(txtjj)
If txthp > 30000000 Then
txtdis = Val(txthp) * 0.15
ElseIf txthp > 25000000 Then
txtdis = Val(txthp) * 0.1
ElseIf txthp > 20000000 Then
txtdis = Val(txthp) * 0.05
ElseIf txthp > 15000000 Then
txtdis = Val(txthp) * 0.02
End If
txthb = 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 txtadd_Click()
Data1.Recordset.AddNew
cbxkk.SetFocus
End Sub

Private Sub txtdelete_Click()
Data1.Recordset.Delete
End Sub

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

Private Sub txtsave_Click()
Data1.Recordset.AddNew
End Sub

NEW VB B

nanda b

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 = Left(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 = Mid(txtkb, 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”
ElseIf B = “RPL” Then
jb = “Rekayasa Perangkat Lunak”
p = “Winda Erlianti”
harga = “83000”
End If
tahun = “20” & Right(txtkb, 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 cmdsave_Click()
Data1.Recordset.AddNew
Txtjb.SetFocus
End Sub

Private Sub Cmdhapus_Click()
Data1.Recordset.Delete
End Sub

New VB A

nanda a
Private Sub cmdkeluar_Click()
Unload Me
End Sub

Private Sub cmdlagi_Click()
txtkt.SetFocus
txtht = “”
txtjk = “”
txtjb = “”
txtjt = “”
txtjp = “”
txttotalp = “”

End Sub

Private Sub Cmdprosess_Click()
Dim B, E, M, S As String
B = Left(txtkt, 3)
If B = “BIM” Then
jk = “BIMA”
ht = “50000”
jb = “16.00”
ElseIf B = “EKO” Then
jk = “EKONOMI”
ht = “35000”
jb = “19.00”
ElseIf B = “MUT” Then
jk = “MUTIARA”
ht = “23000”
jb = “17.00”
ElseIf B = “SEN” Then
jk = “SENJA”
ht = “15000”
jb = “20.00”
End If
txtjk = jk
txtjb = jb
txtjt = jt
txttotalp = tp
txtht = ht
txtjt.SetFocus
End Sub
Private Sub txtjt_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txttotalp = Val(txtht) * Val(txtjt)
End If
End Sub

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

Private Sub cmdsave_Click()
Data1.Recordset.AddNew
Txtjb.SetFocus
End Sub

Private Sub Cmdhapus_Click()
Data1.Recordset.Delete
End Sub