tugas vb 5 program

SRI RHY 5 PRG DATA BUKUSRI RHY 5 PRG LPTOPSRI RHY 5 PRG NPM HARGASRI RHY 5 PRG NPM STRATASRI RHY 5 PRG PT PULANGG

 

RUMUS

RUMUS PT PULANG PETANG

Private Sub cmdcancel_Click()

txtnama.SetFocus

txtnama.Text = “”

txtNIK.Text = “”

txtgol.Text = “”

txtKS.Text = “”

txtS.Text = “”

txtTH.Text = “”

Txtjab.Text = “”

txtbag.Text = “”

txtGP.Text = “”

txtTJ.Text = “”

txtTG.Text = “”

End Sub

Private Sub cmdexit_Click()

End

End Sub

Private Sub cmdlagi_Click()

txtnama.SetFocus

txtnama.Text = “”

txtNIK.Text = “”

txtgol.Text = “”

txtKS.Text = “”

txtS.Text = “”

txtTH.Text = “”

Txtjab.Text = “”

txtbag.Text = “”

txtGP.Text = “”

txtTJ.Text = “”

txtTG.Text = “”

End Sub

Private Sub cmdproses_Click()

Dim kode, status, jabatan As Integer

Dim gaji, tunjangan As Currency

jbt = Mid(txtNIK.Text, 5, 1)

If jbt = “A” Then

jbt = “MANAGER”

gol = “I”

gaji = “5000000”

tunjangan = “1000000”

ElseIf jbt = “B” Then

jbt = “Ka.SEKSI”

gol = “II”

gaji = “4000000”

tunjangan = “750000”

ElseIf jbt = “C” Then

jbt = “STAFF”

gol = “III”

gaji = “3000000”

tunjangan = “500000”

End If

 

BAG = Mid(txtNIK.Text, 7, 3)

If BAG = “KEU” Then

txtbag.Text = “ACCOUNTING”

ElseIf BAG = “ADM” Then

txtbag.Text = “ADMINISTRASI”

ElseIf BAG = “SDM” Then

txtbag.Text = “GENERAL AFFAIR”

ElseIf BAG = “EDP” Then

txtbag.Text = “IT UNIT”

ElseIf BAG = “SPM” Then

txtbag.Text = “SECURITY”

End If

 

kode = Mid(txtNIK.Text, 3, 1)

If kode = “S” Then

kode = “S”

status = “SINGLE”

ElseIf kode = “M” Then

kode = “M”

status = “MENIKAH”

ElseIf kode = “J” Then

kode = “J”

status = “JANDA”

ElseIf kode = “D” Then

kode = “D”

status = “DUDA”

End If

Txtjab.Text = jbt

txtGP.Text = gaji

txtTJ.Text = tunjangan

txtKS.Text = kode

txtS.Text = status

txtgol.Text = gol

txtTH.Text = “20” & Left(txtNIK.Text, 2)

txtTG.Text = Val(txtGP.Text) + Val(txtTJ.Text)

End Sub

Private Sub Form_Activate()

txtnama.SetFocus

End Sub

 

Private Sub txtgol_Change()

 

End Sub

 

Private Sub txtnama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtNIK.SetFocus

End If

End Sub

 

RUMUS DATA BUKU

 

Private Sub Cmdproses_Click()

Dim K As String

K = Mid(txtkb.Text, 3, 3)

If K = “SIM” Then

txtjb.Text = “SISTEM INFORMASI MANAJEMEN”

txtp.Text = “ANDRA SETIAWAN”

txthg.Text = “75900”

ElseIf K = “EDP” Then

txtjb.Text = “ELEKTRONIK DATA PROCESSING”

txtp.Text = “DESI ISTIQOMAH”

txthg.Text = “62000”

ElseIf K = “MNJ” Then

txtjb.Text = “MANAJEMEN”

txtp.Text = “SANDY FITRAJAYA”

txthg.Text = “42000”

ElseIf K = “CDR” Then

Txjb.Text = “COREL DRAW”

txtp.Text = “TRI INDAHSARI”

txthg.Text = “53000”

ElseIf K = “RPL” Then

txtjb.Text = “REKAYASA PERANGKAT LUNAK”

txtp.Text = “ERNITA SARI”

txthg.Text = “83000”

End If

K = Mid(txtkb.Text, 1, 1)

If K = “A” Then

txtpenerbit.Text = “ANDI OFFSET YOGYAKARTA”

ElseIf K = “I” Then

txtpenerbit.Text = “INDAH SURABAYA”

ElseIf K = “S” Then

txtpenerbit.Text = “SALEMBA EMPAT”

ElseIf K = “E” Then

txtpenerbit.Text = “ELEK MEDIA KOMPUTINDO”

ElseIf K = “M” Then

txtpenerbit.Text = “MAXICOM”

End If

txttahun.Text = “20” & Right(txtkb.Text, 2)

End Sub

 

Private Sub Cmdlagi_Click()

txtkb.SetFocus

txtjb.Text = “”

txtp.Text = “”

txthg.Text = “”

txtpenerbit.Text = “”

txttahun.Text = “”

txtkb.Text = “”

End Sub

 

Private Sub Cmdbatal_Click()

txtkb.SetFocus

txtjb.Text = “”

txtp.Text = “”

txthg.Text = “”

txtpenerbit.Text = “”

txttahun.Text = “”

txtkb.Text = “”

End Sub

 

Private Sub Cmdkeluar_Click()

Unload Me

End Sub

 

 

Private Sub txtkb_Change()

 

End Sub

 

RUMUS NPM 4 DGT

Private Sub Cmdkeluar_Click()

Unload Me

End Sub

 

Private Sub Cmdlagi_Click()

Text1.SetFocus

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

Text7.Text = “”

Text8.Text = “”

Text9.Text = “”

Text10.Text = “”

Text11.Text = “”

Text12.Text = “”

End Sub

 

Private Sub Cmdbatal_Click()

Text1.SetFocus

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

Text7.Text = “”

Text8.Text = “”

Text9.Text = “”

Text10.Text = “”

Text11.Text = “”

Text12.Text = “”

End Sub

 

Private Sub Cmdproses_Click()

Dim S As String

Text6.Text = “20” & Mid(Text2.Text, 3, 2)

S = Mid(Text2.Text, 1, 1)

If S = “E” Then

Text3.Text = “EKSEKUTIF”

Text10.Text = “1250000”

Text11.Text = “600000”

ElseIf S = “R” Then

Text3.Text = “REGULER”

Text10.Text = “1000000”

Text11.Text = “600000”

End If

S = Mid(Text2.Text, 5, 1)

If S = “1” Then

Text4.Text = “Sistem Informasi”

ElseIf S = “2” Then

Text4.Text = “Manajemen Informatika”

ElseIf S = “3” Then

Text4.Text = “Manajemen dan Komp. Akuntansi”

End If

S = Mid(Text2.Text, 6, 2)

If S = “01” Then

Text5.Text = “Strata Satu”

Text8.Text = “200000”

ElseIf S = “02” Then

Text5.Text = “Diploma Tiga”

Text8.Text = “150000”

ElseIf S = “03” Then

Text5.Text = “Diploma Satu”

Text8.Text = “150000”

End If

S = Mid(Text2.Text, 1, 1) & Mid(Text2.Text, 6, 2)

If S = “E” & “01” Then

Text9.Text = “1900000”

ElseIf S = “E” & “02” Then

Text9.Text = “1650000”

ElseIf S = “E” & “03” Then

Text9.Text = “1350000”

ElseIf S = “R” & “01” Then

Text9.Text = “1500000”

ElseIf S = “R” & “02” Then

Text9.Text = “1250000”

ElseIf S = “R” & “03” Then

Text9.Text = “1250000”

End If

Text7.Text = Right(Text2.Text, 3)

TOTAL = Val(Text8.Text) + Val(Text9.Text) + Val(Text10.Text) + Val(Text11.Text)

Text12.Text = TOTAL

End Sub

 

Private Sub text1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text2.SetFocus

End If

End Sub

 

RUMUS NPM, TERBILANG

Private Sub cmdkeluar_Click()

Unload Me

End Sub

 

Private Sub cmdlagi_Click()

txtnama.SetFocus

txtnama.Text = “”

txtnpm.Text = “”

txtjurusan.Text = “”

txtpstudi.Text = “”

txttahun.Text = “”

txtnurut.Text = “”

txtbp.Text = “”

txtterbilang.Text = “”

End Sub

 

Private Sub cmdproses_Click()

Dim S As String

txttahun.Text = “20” & Left(txtnpm.Text, 2)

S = Mid(txtnpm.Text, 3, 1)

If S = “1” Then

txtjurusan.Text = “Sistem Informasi”

ElseIf S = “2” Then

txtjurusan.Text = “Teknik Informasi”

ElseIf S = “3” Then

txtjurusan.Text = “Manajemen Informatika”

ElseIf S = “4” Then

txtjurusan.Text = “Manajemen & Komp. Akuntansi”

End If

S = Mid(txtnpm.Text, 3, 1)

If S = “1” Then

txtpstudi.Text = “Strata Satu”

txtbp.Text = “1950000”

ElseIf S = “2” Then

txtpstudi.Text = “Diploma Tiga”

txtbp.Text = “1750000”

ElseIf S = “3” Then

txtpstudi.Text = “Diploma Empat”

txtbp.Text = “1650000”

ElseIf S = “4” Then

txtpstudi.Text = “Diploma Dua”

txtbp.Text = “1450000”

End If

txtnurut.Text = Right(txtnpm.Text, 3)

End Sub

 

 

Private Sub txtbp_Change()

txtterbilang.Text = terbilang(Val(txtbp.Text))

End Sub

 

Private Sub txtnama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtnpm.SetFocus

End If

End Sub

 

Private Function baca(X As Integer) As String

Dim i As Long

Dim ratus(9) As String

Dim belas(9) As String

Dim puluh(9) As String

Dim satuan(9) As String

Dim sbaca As String

satuan(1) = “satu”

satuan(2) = “dua”

satuan(3) = “tiga”

satuan(4) = “empat”

satuan(5) = “lima”

satuan(6) = “enam”

satuan(7) = “tujuh”

satuan(8) = “delapan”

satuan(9) = “sembilan”

For i = 1 To 9

If i = 1 Then

puluh(i) = “sepuluh”

Else

puluh(i) = satuan(i) & ” puluh”

End If

Next

For i = 1 To 9

If i = 1 Then

belas(i) = “sebelas”

Else

belas(i) = satuan(i) & ” belas”

End If

Next

For i = 1 To 9

If i = 1 Then

ratus(i) = “seratus”

Else

ratus(i) = satuan(i) & ” ratus”

End If

Next

If X >= 100 Then

sbaca = ratus(Val(Mid(Str(X), 2, 1)))

X = Val(Mid(Str(X), 3, 2))

End If

If X >= 20 Or X = 10 Then

sbaca = sbaca & ” ” & puluh(Val(Mid(Str(X), 2, 1)))

X = Val(Mid(Str(X), 3, 1))

Else

If X > 10 Then

sbaca = sbaca & ” ” & belas(Val(Mid(Str(X), 3, 1)))

X = -1

End If

End If

If X >= 1 Then

sbaca = sbaca & ” ” & satuan(Val((Str(X))))

End If

baca = sbaca

End Function

Function terbilang(X As Currency) As String

Dim ribu, juta, milyar, trilyun, ratusan As Integer

Dim sterbilang As String

Dim ptext As Byte

sterbilang = “”

If Val(X) = 1000000000000# Then

ptext = Len(Str(X)) – 13

trilyun = Val(Mid(Str(X), 2, ptext))

sterbilang = sterbilang & ” ” & baca(Val(trilyun)) & ” trilyun”

X = Val(Mid(Str(X), ptext + 2, 12))

End If

If X >= 1000000000 Then

ptext = Len(Str(X)) – 10

milyar = Val(Mid(Str(X), 2, ptext))

sterbilang = sterbilang & ” ” & baca(Val(milyar)) & ” milyar”

X = Val(Mid(Str(X), ptext + 2, 9))

End If

If X >= 1000000 Then

ptext = Len(Str(X)) – 7

juta = Val(Mid(Str(X), 2, ptext))

sterbilang = sterbilang & ” ” & baca(Val(juta)) & ” juta”

X = Val(Mid(Str(X), ptext + 2, 6))

End If

If X >= 1000 Then

ptext = Len(Str(X)) – 4

ribu = Val(Mid(Str(X), 2, ptext))

If ribu = 1 Then

sterbilang = “seribu”

Else

sterbilang = sterbilang & ” ” & baca(Val(ribu)) & ” ribu”

End If

X = Val(Mid(Str(X), ptext + 2, 3))

End If

sterbilang = sterbilang & ” ” & baca(Val(X))

terbilang = Trim(sterbilang) & ” rupiah”

End Function

RUMUS PENJUALAN LEPTOP

 

 

Private Sub Combo1_Click()

Text3.SetFocus

End Sub

 

Private Sub Command1_Click()

Dim H As String

H = Mid(Combo1.Text, 7, 5)

If H = “MC965” Then

Text1.Text = “Apple MacBook Air MC965”

Text2.Text = 12800000

ElseIf H = “MC966” Then

Text1.Text = “Apple MacBook Air MC966”

Text2.Text = 15800000

ElseIf H = “MC968” Then

Text1.Text = “Apple MacBook Air MC968”

Text2.Text = 9900000

ElseIf H = “MC969” Then

Text1.Text = “Apple MacBook Air MC969”

Text2.Text = 11900000

ElseIf H = “MC700” Then

Text1.Text = “Apple MacBook Pro MC700”

Text2.Text = 10800000

ElseIf H = “MC721” Then

Text1.Text = “Apple MacBook Pro MC721”

Text2.Text = 15900000

ElseIf H = “MC723” Then

Text1.Text = “Apple MacBook Pro MC723”

Text2.Text = 19300000

ElseIf H = “MC724” Then

Text1.Text = “Apple MacBook Pro MC724”

Text2.Text = 13700000

ElseIf H = “MC311” Then

Text1.Text = “Apple MacBook Pro MC311”

Text2.Text = 24200000

ElseIf H = “MC313” Then

Text1.Text = “Apple MacBook Pro MC313”

Text2.Text = 11900000

ElseIf H = “MC314” Then

Text1.Text = “Apple MacBook Pro MC314”

Text2.Text = 14700000

ElseIf H = “MC318” Then

Text1.Text = “Apple MacBook Pro MC318”

Text2.Text = 17600000

ElseIf H = “MC322” Then

Text1.Text = “Apple MacBook Pro MC322”

Text2.Text = 21300000

End If

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

If Text4.Text >= 15000000 Then

Text5.Text = Val(Text4.Text) * 2 / 100

ElseIf Text4.Text <= 25000000 Then

Text5.Text = Val(Text4.Text) * 5 / 100

ElseIf Text4.Text <= 30000000 Then

Text5.Text = Val(Text4.Text) * 10 / 100

ElseIf Text4.Text > 30000000 Then

Text5.Text = Val(Text4.Text) * 15 / 100

End If

Text6.Text = Val(Text4.Text) – Val(Text5.Text)

End Sub

 

Private Sub Command2_Click()

Combo1.SetFocus

Combo1.Text = “”

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

End Sub

 

Private Sub Command3_Click()

Unload Me

End Sub

Private Sub Form_Load()

Combo1.AddItem “Apple MC965 MacBook Air”

Combo1.AddItem “Apple MC966 MacBook Air”

Combo1.AddItem “Apple MC968 MacBook Air”

Combo1.AddItem “Apple MC969 MacBook Air”

Combo1.AddItem “Apple MC700 MacBook Pro”

Combo1.AddItem “Apple MC721 MacBook Pro”

Combo1.AddItem “Apple MC723 MacBook Pro”

Combo1.AddItem “Apple MC724 MacBook Pro”

Combo1.AddItem “Apple MC311 MacBook Pro”

Combo1.AddItem “Apple MC313 MacBook Pro”

Combo1.AddItem “Apple MC314 MacBook Pro”

Combo1.AddItem “Apple MC318 MacBook Pro”

Combo1.AddItem “Apple MC322 MacBook Pro”

End Sub

 

Iklan

tugas vb 10 program

NPM 4 DIGITSRI PENJUALAN TIKET KERETASRI NIDN NMSRI NAMA NPMSRI HURUF MUTUSRI ENTRI PENJUALAN LEPTOPSRI ENTRI PENJUALAN COMPUTERSRI DATA BUKU 2SRI DATA BK STMIK PRINGSEWU

 

DATA BUKU STMIK PRINGSEWU

Private Sub Command1_Click()

Dim J As String

J = Mid(Text6.Text, 3, 3)

If J = “SIM” Then

Text1.Text = “SISTEM INFORMASI MANAJEMEN”

Text2.Text = “YATI NUR OKTAFIA”

Text5.Text = “75900”

ElseIf J = “EDP” Then

Text1.Text = “ELEKTRONIK DATA PROCESSING”

Text2.Text = “WAGIANTO”

Text5.Text = “62000”

ElseIf J = “MNJ” Then

Text1.Text = “MANAJEMEN”

Text2.Text = “VALINTINA MARIANAN”

Text5.Text = “42000”

ElseIf J = “CDR” Then

Text1.Text = “COREL DRAW”

Text2.Text = “SITI FADILAH”

Text5.Text = “53000”

ElseIf J = “RPL” Then

Text1.Text = “REKAYASA PERANGKAT LUNAK”

Text2.Text = “FRENDI SETIADI”

Text5.Text = “83000”

End If

J = Left(Text6.Text, 1)

If J = “A” Then

Text4.Text = “ANDI OFFSET YOGYAKARTA”

ElseIf J = “I” Then

Text4.Text = “INDAH SURABAYA”

ElseIf J = “S” Then

Text4.Text = “SALEMBA EMPAT”

ElseIf J = “E” Then

Text4.Text = “ELEK MEDIA KOMPUTINDO”

ElseIf J = “M” Then

Text4.Text = “MAXICOM”

End If

Text3.Text = “20” & Right(Text6.Text, 2)

End Sub

 

Private Sub Command2_Click()

Text6.SetFocus

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

End Sub

 

Private Sub Command3_Click()

Text6.SetFocus

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

End Sub

 

Private Sub Command4_Click()

Unload Me

End Sub

 

Private Sub Text6_Change()

 

End Sub

 

 

 

 

 

 

 

ENTRI PENJUALAN KOMPUTER

 

Private Sub Combo1_Click()

Dim JENKOM, HARSA As String

Select Case Combo1.Text

Case “P205”

JENKOM = “Pentium II 500 MegaHz”

HARSA = 1500000

Case “P308”

JENKOM = “Pentium III 800 MegaHz”

HARSA = 2100000

Case “P310”

JENKOM = “Pentium III 1.0 GigaHz”

HARSA = 3500000

Case “P415”

JENKOM = “Pentium IV 1.5 GigaHz”

HARSA = 4000000

Case “P417”

JENKOM = “Pentium IV 1.7 GigaHz”

HARSA = 4200000

Case “P419”

JENKOM = “Pentium IV 1.9 GigaHz”

HARSA = 5500000

Case Else

JENKOM = 0

HARSA = 0

End Select

Text1.Text = JENKOM

Text2.Text = HARSA

Text3.SetFocus

 

End Sub

 

Private Sub Command1_Click()

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

If Text4.Text >= 15000000 Then

Text5.Text = Val(Text4.Text) * 2 / 100

ElseIf Text4.Text <= 25000000 Then

Text5.Text = Val(Text4.Text) * 5 / 100

ElseIf Text4.Text <= 30000000 Then

Text5.Text = Val(Text4.Text) * 10 / 100

ElseIf Text4.Text > 30000000 Then

Text5.Text = Val(Text4.Text) * 15 / 100

End If

Text6.Text = Val(Text4.Text) – Val(Text5.Text)

End Sub

 

Private Sub Command2_Click()

Combo1.SetFocus

Combo1.Text = “”

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

End Sub

 

Private Sub Command3_Click()

Unload Me

End Sub

 

Private Sub Form_Load()

Combo1.AddItem “P205”

Combo1.AddItem “P308”

Combo1.AddItem “P310”

Combo1.AddItem “P415”

Combo1.AddItem “P417”

Combo1.AddItem “P419”

End Sub

 

Private Sub Text1_Change()

 

End Sub

 

 

 

 

 

 

 

TIKET PENJUALAN KERETA API

Private Sub Command1_Click()

Dim A As String

A = Mid(Text1.Text, 1, 3)

If A = “BIM” Then

Text2.Text = 50000

Text3.Text = “16.00”

Text6.Text = “BIMA”

ElseIf A = “EKO” Then

Text2.Text = 35000

Text3.Text = “19.00”

Text6.Text = “EKONOMI”

ElseIf A = “MUT” Then

Text2.Text = 23000

Text3.Text = “17.00”

Text6.Text = “MUTIARA”

ElseIf A = “SEN” Then

Text2.Text = 15000

Text3.Text = “20.00”

Text6.Text = “SENJA”

End If

Text5.Text = Val(Text2.Text) * Val(Text4.Text)

 

End Sub

 

Private Sub Command2_Click()

Text1.SetFocus

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

End Sub

 

Private Sub TEXT1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text4.SetFocus

End If

End Sub

 

Private Sub Command3_Click()

Unload Me

End Sub

 

 

ENTRI PENJUALAN APPLE

Private Sub Combo1_Click()

Text3.SetFocus

End Sub

 

Private Sub Command1_Click()

Dim H As String

H = Mid(Combo1.Text, 7, 5)

If H = “MC965” Then

Text1.Text = “Apple MacBook Air MC965”

Text2.Text = 12800000

ElseIf H = “MC966” Then

Text1.Text = “Apple MacBook Air MC966”

Text2.Text = 15800000

ElseIf H = “MC968” Then

Text1.Text = “Apple MacBook Air MC968”

Text2.Text = 9900000

ElseIf H = “MC969” Then

Text1.Text = “Apple MacBook Air MC969”

Text2.Text = 11900000

ElseIf H = “MC700” Then

Text1.Text = “Apple MacBook Pro MC700”

Text2.Text = 10800000

ElseIf H = “MC721” Then

Text1.Text = “Apple MacBook Pro MC721”

Text2.Text = 15900000

ElseIf H = “MC723” Then

Text1.Text = “Apple MacBook Pro MC723”

Text2.Text = 19300000

ElseIf H = “MC724” Then

Text1.Text = “Apple MacBook Pro MC724”

Text2.Text = 13700000

ElseIf H = “MC311” Then

Text1.Text = “Apple MacBook Pro MC311”

Text2.Text = 24200000

ElseIf H = “MC313” Then

Text1.Text = “Apple MacBook Pro MC313”

Text2.Text = 11900000

ElseIf H = “MC314” Then

Text1.Text = “Apple MacBook Pro MC314”

Text2.Text = 14700000

ElseIf H = “MC318” Then

Text1.Text = “Apple MacBook Pro MC318”

Text2.Text = 17600000

ElseIf H = “MC322” Then

Text1.Text = “Apple MacBook Pro MC322”

Text2.Text = 21300000

End If

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

If Text4.Text >= 15000000 Then

Text5.Text = Val(Text4.Text) * 2 / 100

ElseIf Text4.Text <= 25000000 Then

Text5.Text = Val(Text4.Text) * 5 / 100

ElseIf Text4.Text <= 30000000 Then

Text5.Text = Val(Text4.Text) * 10 / 100

ElseIf Text4.Text > 30000000 Then

Text5.Text = Val(Text4.Text) * 15 / 100

End If

Text6.Text = Val(Text4.Text) – Val(Text5.Text)

End Sub

 

Private Sub Command2_Click()

Combo1.SetFocus

Combo1.Text = “”

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

End Sub

 

Private Sub Command3_Click()

Unload Me

End Sub

Private Sub Form_Load()

Combo1.AddItem “Apple MC965 MacBook Air”

Combo1.AddItem “Apple MC966 MacBook Air”

Combo1.AddItem “Apple MC968 MacBook Air”

Combo1.AddItem “Apple MC969 MacBook Air”

Combo1.AddItem “Apple MC700 MacBook Pro”

Combo1.AddItem “Apple MC721 MacBook Pro”

Combo1.AddItem “Apple MC723 MacBook Pro”

Combo1.AddItem “Apple MC724 MacBook Pro”

Combo1.AddItem “Apple MC311 MacBook Pro”

Combo1.AddItem “Apple MC313 MacBook Pro”

Combo1.AddItem “Apple MC314 MacBook Pro”

Combo1.AddItem “Apple MC318 MacBook Pro”

Combo1.AddItem “Apple MC322 MacBook Pro”

End Sub

 

 

DATA BUKU 2

Private Sub Command1_Click()

Dim K As String

K = Mid(Text6.Text, 1, 3)

If K = “SIM” Then

Text1.Text = “SISTEM INFORMASI MANAJEMEN”

Text2.Text = “FADIYA ULFA”

Text5.Text = “75900”

ElseIf K = “EDP” Then

Text1.Text = “ELEKTRONIK DATA PROCESSING”

Text2.Text = “NURUL AGUSTINA”

Text5.Text = “62000”

ElseIf K = “MNJ” Then

Text1.Text = “MANAJEMEN”

Text2.Text = “RIAN HIDAYAT”

Text5.Text = “42000”

ElseIf K = “CDR” Then

Text1.Text = “COREL DRAW”

Text2.Text = “SITI NUR KHOTIMAH”

Text5.Text = “53000”

ElseIf K = “RPL” Then

Text1.Text = “REKAYASA PERANGKAT LUNAK”

Text2.Text = “WINDA ERLIANTI”

Text5.Text = “83000”

End If

K = Right(Text6.Text, 1)

If K = “A” Then

Text4.Text = “ANDI OFFSET YOGYAKARTA”

ElseIf K = “I” Then

Text4.Text = “INDAH SURABAYA”

ElseIf K = “S” Then

Text4.Text = “SALEMBA EMPAT”

ElseIf K = “E” Then

Text4.Text = “ELEK MEDIA KOMPUTINDO”

ElseIf K = “M” Then

Text4.Text = “MAXICOM”

End If

Text3.Text = “20” & Mid(Text6.Text, 5, 2)

End Sub

 

Private Sub Command2_Click()

Text6.SetFocus

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

End Sub

 

Private Sub Command3_Click()

Text6.SetFocus

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

End Sub

 

Private Sub Command4_Click()

Unload Me

End Sub

 

Private Sub Text1_Change()

 

End Sub

 

 

 

 

 

NIDN

Private Sub Combo1_Click()

Dim gapok, tunjangan, pajak, total As String

Select Case Combo1.Text

Case “I”

gapok = 1500000

tunjangan = 150000

Case “II”

gapok = 2000000

tunjangan = 200000

Case “III”

gapok = 2500000

tunjangan = 250000

Case “IV”

gapok = 3000000

tunjangan = 300000

Case Else

gapok = 0

tunjangan = 0

End Select

total = gapok + tunjangan

pajak = total * 0.1

Text3.Text = gapok

Text4.Text = tunjangan

Text5.Text = pajak

Text6.Text = total – pajak

End Sub

 

Private Sub Command1_Click()

Text1.SetFocus

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

Combo1.Text = “”

End Sub

 

Private Sub TEXT1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text2.SetFocus

End If

End Sub

 

Private Sub Command2_Click()

Text1.SetFocus

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

Combo1.Text = “”

End Sub

 

Private Sub Command3_Click()

Unload Me

End Sub

 

Private Sub Form_Load()

Combo1.AddItem “I”

Combo1.AddItem “II”

Combo1.AddItem “III”

Combo1.AddItem “IV”

End Sub

 

HURUF MUTU

Private Sub Combo1_CLICK()

Dim NAMA, JURUSAN, HM As String

Select Case Combo1.Text

Case “09100027”

NAMA = “AFNAN ZALFA SALSABILAA”

JURUSAN = “Sistem Informasi”

Case “09200048”

NAMA = “AMALIA AMANAH”

JURUSAN = “MANAJEMEN INFORMATIKA”

Case “09300024”

NAMA = “SASKIA MECHA”

JURUSAN = ” TEKNIK INFORMATIKA”

End Select

Text1.Text = NAMA

Text2.Text = JURUSAN

Text3.SetFocus

End Sub

 

Private Sub Command1_Click()

Dim NA As Integer

Dim HM As String

QUIS = Val(Text3.Text)

TUGAS = Val(Text4.Text)

UTS = Val(Text5.Text)

UAS = Val(Text6.Text)

NA = (QUIS + TUGAS + UTS + UAS) / 4

Text7.Text = NA

Select Case Text7.Text

Case Is > 80

HM = “A”

Case Is > 70

HM = “B”

Case Is > 60

HM = “C”

Case Is > 50

HM = “D”

Case Is > 50

HM = “E”

Case Is < 50

HM = “BL”

End Select

Text8.Text = HM

End Sub

 

 

 

Private Sub Command2_Click()

Combo1.SetFocus

Combo1.Text = “”

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

Text7.Text = “”

Text8.Text = “”

End Sub

 

Private Sub Command3_Click()

Unload Me

End Sub

 

Private Sub Form_Load()

Combo1.AddItem “09100027”

Combo1.AddItem “09200048”

Combo1.AddItem “09300024”

End Sub

 

 

Private Sub Text3_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text4.SetFocus

End If

End Sub

Private Sub Text4_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text5.SetFocus

End If

End Sub

Private Sub Text5_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text6.SetFocus

End If

End Sub

 

 

 

 

NPM

Private Sub Command1_Click()

Dim S As String

Text5.Text = “20” & Left(Text2.Text, 2)

S = Mid(Text2.Text, 3, 1)

If S = “1” Then

Text3.Text = “Sistem Informasi”

ElseIf S = “2” Then

Text3.Text = “Manajemen Informatika”

ElseIf S = “3” Then

Text3.Text = “Tehnik Informatika”

ElseIf S = “4” Then

Text3.Text = “Manajemen & Komp. Akuntansi”

End If

S = Mid(Text2.Text, 3, 1)

If S = “1” Then

Text4.Text = “Strata Satu”

ElseIf S = “2” Then

Text4.Text = “Diploma Tiga”

ElseIf S = “3” Then

Text4.Text = “Diploma Empat”

ElseIf S = “4” Then

Text4.Text = “Diploma Dua”

End If

Text6.Text = Right(Text2.Text, 3)

End Sub

 

Private Sub Command2_Click()

Text1.SetFocus

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

End Sub

 

Private Sub Command3_Click()

Text1.SetFocus

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

End Sub

 

Private Sub TEXT1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text2.SetFocus

End If

End Sub

 

Private Sub Command4_Click()

Unload Me

End Sub

 

NPM 4 DIGIT

Private Sub Cmdbatal_Click()

txtnama.SetFocus

txtnama.Text = “”

txtnpm.Text = “”

txtjur.Text = “”

txtps.Text = “”

txttm.Text = “”

txturut.Text = “”

End Sub

 

Private Sub Cmdkeluar_Click()

Unload Me

End Sub

 

Private Sub Cmdlagi_Click()

txtnama.SetFocus

txtnama.Text = “”

txtnpm.Text = “”

txtjur.Text = “”

txtps.Text = “”

txttm.Text = “”

txturut.Text = “”

End Sub

 

Private Sub Cmdproses_Click()

Dim S As String

S = Mid(txtnpm.Text, 3, 1)

If S = “1” Then

txtjur.Text = “Sistem Informasi”

ElseIf S = “2” Then

txtjur.Text = “Teknik informatika”

ElseIf S = “3” Then

txtjur.Text = “Manajemen Informatika”

ElseIf S = “4” Then

txtps.Text = “komputer akuntansi”

End If

S = Mid(txtnpm.Text, 4, 2)

If S = “01” Then

txtps.Text = “strata satu”

ElseIf S = “02” Then

txtps.Text = “diploma empat”

ElseIf S = “03” Then

txtps.Text = “diploma tiga”

ElseIf S = “04” Then

txtps.Text = “diploma dua”

End If

txttm.Text = “20” & Left(txtnpm.Text, 2)

txturut.Text = Right(txtnpm.Text, 3)

End Sub

Private Sub Form_active()

txtnama.SetFocus

txtnama.Text = “”

txtnpm.Text = “”

txtjur.Text = “”

txtps.Text = “”

txttm.Text = “”

txturut.Text = “”

End Sub

Private Sub txtnama_Keypress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtnpm.SetFocus

End If

End Sub

 

tugas vb 10 program web3

NPM 4 DIGITSRI PENJUALAN TIKET KERETASRI NIDN NMSRI NAMA NPMSRI HURUF MUTUSRI ENTRI PENJUALAN LEPTOPSRI ENTRI PENJUALAN COMPUTERSRI DATA BUKU 2SRI DATA BUKU 2

DATA BUKU STMIK PRINGSEWU

Private Sub Command1_Click()

Dim J As String

J = Mid(Text6.Text, 3, 3)

If J = “SIM” Then

Text1.Text = “SISTEM INFORMASI MANAJEMEN”

Text2.Text = “YATI NUR OKTAFIA”

Text5.Text = “75900”

ElseIf J = “EDP” Then

Text1.Text = “ELEKTRONIK DATA PROCESSING”

Text2.Text = “WAGIANTO”

Text5.Text = “62000”

ElseIf J = “MNJ” Then

Text1.Text = “MANAJEMEN”

Text2.Text = “VALINTINA MARIANAN”

Text5.Text = “42000”

ElseIf J = “CDR” Then

Text1.Text = “COREL DRAW”

Text2.Text = “SITI FADILAH”

Text5.Text = “53000”

ElseIf J = “RPL” Then

Text1.Text = “REKAYASA PERANGKAT LUNAK”

Text2.Text = “FRENDI SETIADI”

Text5.Text = “83000”

End If

J = Left(Text6.Text, 1)

If J = “A” Then

Text4.Text = “ANDI OFFSET YOGYAKARTA”

ElseIf J = “I” Then

Text4.Text = “INDAH SURABAYA”

ElseIf J = “S” Then

Text4.Text = “SALEMBA EMPAT”

ElseIf J = “E” Then

Text4.Text = “ELEK MEDIA KOMPUTINDO”

ElseIf J = “M” Then

Text4.Text = “MAXICOM”

End If

Text3.Text = “20” & Right(Text6.Text, 2)

End Sub

 

Private Sub Command2_Click()

Text6.SetFocus

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

End Sub

 

Private Sub Command3_Click()

Text6.SetFocus

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

End Sub

 

Private Sub Command4_Click()

Unload Me

End Sub

 

Private Sub Text6_Change()

 

End Sub

 

 

 

 

 

 

 

ENTRI PENJUALAN KOMPUTER

 

Private Sub Combo1_Click()

Dim JENKOM, HARSA As String

Select Case Combo1.Text

Case “P205”

JENKOM = “Pentium II 500 MegaHz”

HARSA = 1500000

Case “P308”

JENKOM = “Pentium III 800 MegaHz”

HARSA = 2100000

Case “P310”

JENKOM = “Pentium III 1.0 GigaHz”

HARSA = 3500000

Case “P415”

JENKOM = “Pentium IV 1.5 GigaHz”

HARSA = 4000000

Case “P417”

JENKOM = “Pentium IV 1.7 GigaHz”

HARSA = 4200000

Case “P419”

JENKOM = “Pentium IV 1.9 GigaHz”

HARSA = 5500000

Case Else

JENKOM = 0

HARSA = 0

End Select

Text1.Text = JENKOM

Text2.Text = HARSA

Text3.SetFocus

 

End Sub

 

Private Sub Command1_Click()

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

If Text4.Text >= 15000000 Then

Text5.Text = Val(Text4.Text) * 2 / 100

ElseIf Text4.Text <= 25000000 Then

Text5.Text = Val(Text4.Text) * 5 / 100

ElseIf Text4.Text <= 30000000 Then

Text5.Text = Val(Text4.Text) * 10 / 100

ElseIf Text4.Text > 30000000 Then

Text5.Text = Val(Text4.Text) * 15 / 100

End If

Text6.Text = Val(Text4.Text) – Val(Text5.Text)

End Sub

 

Private Sub Command2_Click()

Combo1.SetFocus

Combo1.Text = “”

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

End Sub

 

Private Sub Command3_Click()

Unload Me

End Sub

 

Private Sub Form_Load()

Combo1.AddItem “P205”

Combo1.AddItem “P308”

Combo1.AddItem “P310”

Combo1.AddItem “P415”

Combo1.AddItem “P417”

Combo1.AddItem “P419”

End Sub

 

Private Sub Text1_Change()

 

End Sub

 

 

 

 

 

 

 

TIKET PENJUALAN KERETA API

Private Sub Command1_Click()

Dim A As String

A = Mid(Text1.Text, 1, 3)

If A = “BIM” Then

Text2.Text = 50000

Text3.Text = “16.00”

Text6.Text = “BIMA”

ElseIf A = “EKO” Then

Text2.Text = 35000

Text3.Text = “19.00”

Text6.Text = “EKONOMI”

ElseIf A = “MUT” Then

Text2.Text = 23000

Text3.Text = “17.00”

Text6.Text = “MUTIARA”

ElseIf A = “SEN” Then

Text2.Text = 15000

Text3.Text = “20.00”

Text6.Text = “SENJA”

End If

Text5.Text = Val(Text2.Text) * Val(Text4.Text)

 

End Sub

 

Private Sub Command2_Click()

Text1.SetFocus

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

End Sub

 

Private Sub TEXT1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text4.SetFocus

End If

End Sub

 

Private Sub Command3_Click()

Unload Me

End Sub

 

 

ENTRI PENJUALAN APPLE

Private Sub Combo1_Click()

Text3.SetFocus

End Sub

 

Private Sub Command1_Click()

Dim H As String

H = Mid(Combo1.Text, 7, 5)

If H = “MC965” Then

Text1.Text = “Apple MacBook Air MC965”

Text2.Text = 12800000

ElseIf H = “MC966” Then

Text1.Text = “Apple MacBook Air MC966”

Text2.Text = 15800000

ElseIf H = “MC968” Then

Text1.Text = “Apple MacBook Air MC968”

Text2.Text = 9900000

ElseIf H = “MC969” Then

Text1.Text = “Apple MacBook Air MC969”

Text2.Text = 11900000

ElseIf H = “MC700” Then

Text1.Text = “Apple MacBook Pro MC700”

Text2.Text = 10800000

ElseIf H = “MC721” Then

Text1.Text = “Apple MacBook Pro MC721”

Text2.Text = 15900000

ElseIf H = “MC723” Then

Text1.Text = “Apple MacBook Pro MC723”

Text2.Text = 19300000

ElseIf H = “MC724” Then

Text1.Text = “Apple MacBook Pro MC724”

Text2.Text = 13700000

ElseIf H = “MC311” Then

Text1.Text = “Apple MacBook Pro MC311”

Text2.Text = 24200000

ElseIf H = “MC313” Then

Text1.Text = “Apple MacBook Pro MC313”

Text2.Text = 11900000

ElseIf H = “MC314” Then

Text1.Text = “Apple MacBook Pro MC314”

Text2.Text = 14700000

ElseIf H = “MC318” Then

Text1.Text = “Apple MacBook Pro MC318”

Text2.Text = 17600000

ElseIf H = “MC322” Then

Text1.Text = “Apple MacBook Pro MC322”

Text2.Text = 21300000

End If

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

If Text4.Text >= 15000000 Then

Text5.Text = Val(Text4.Text) * 2 / 100

ElseIf Text4.Text <= 25000000 Then

Text5.Text = Val(Text4.Text) * 5 / 100

ElseIf Text4.Text <= 30000000 Then

Text5.Text = Val(Text4.Text) * 10 / 100

ElseIf Text4.Text > 30000000 Then

Text5.Text = Val(Text4.Text) * 15 / 100

End If

Text6.Text = Val(Text4.Text) – Val(Text5.Text)

End Sub

 

Private Sub Command2_Click()

Combo1.SetFocus

Combo1.Text = “”

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

End Sub

 

Private Sub Command3_Click()

Unload Me

End Sub

Private Sub Form_Load()

Combo1.AddItem “Apple MC965 MacBook Air”

Combo1.AddItem “Apple MC966 MacBook Air”

Combo1.AddItem “Apple MC968 MacBook Air”

Combo1.AddItem “Apple MC969 MacBook Air”

Combo1.AddItem “Apple MC700 MacBook Pro”

Combo1.AddItem “Apple MC721 MacBook Pro”

Combo1.AddItem “Apple MC723 MacBook Pro”

Combo1.AddItem “Apple MC724 MacBook Pro”

Combo1.AddItem “Apple MC311 MacBook Pro”

Combo1.AddItem “Apple MC313 MacBook Pro”

Combo1.AddItem “Apple MC314 MacBook Pro”

Combo1.AddItem “Apple MC318 MacBook Pro”

Combo1.AddItem “Apple MC322 MacBook Pro”

End Sub

 

 

DATA BUKU 2

Private Sub Command1_Click()

Dim K As String

K = Mid(Text6.Text, 1, 3)

If K = “SIM” Then

Text1.Text = “SISTEM INFORMASI MANAJEMEN”

Text2.Text = “FADIYA ULFA”

Text5.Text = “75900”

ElseIf K = “EDP” Then

Text1.Text = “ELEKTRONIK DATA PROCESSING”

Text2.Text = “NURUL AGUSTINA”

Text5.Text = “62000”

ElseIf K = “MNJ” Then

Text1.Text = “MANAJEMEN”

Text2.Text = “RIAN HIDAYAT”

Text5.Text = “42000”

ElseIf K = “CDR” Then

Text1.Text = “COREL DRAW”

Text2.Text = “SITI NUR KHOTIMAH”

Text5.Text = “53000”

ElseIf K = “RPL” Then

Text1.Text = “REKAYASA PERANGKAT LUNAK”

Text2.Text = “WINDA ERLIANTI”

Text5.Text = “83000”

End If

K = Right(Text6.Text, 1)

If K = “A” Then

Text4.Text = “ANDI OFFSET YOGYAKARTA”

ElseIf K = “I” Then

Text4.Text = “INDAH SURABAYA”

ElseIf K = “S” Then

Text4.Text = “SALEMBA EMPAT”

ElseIf K = “E” Then

Text4.Text = “ELEK MEDIA KOMPUTINDO”

ElseIf K = “M” Then

Text4.Text = “MAXICOM”

End If

Text3.Text = “20” & Mid(Text6.Text, 5, 2)

End Sub

 

Private Sub Command2_Click()

Text6.SetFocus

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

End Sub

 

Private Sub Command3_Click()

Text6.SetFocus

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

End Sub

 

Private Sub Command4_Click()

Unload Me

End Sub

 

Private Sub Text1_Change()

 

End Sub

 

 

 

 

 

NIDN

Private Sub Combo1_Click()

Dim gapok, tunjangan, pajak, total As String

Select Case Combo1.Text

Case “I”

gapok = 1500000

tunjangan = 150000

Case “II”

gapok = 2000000

tunjangan = 200000

Case “III”

gapok = 2500000

tunjangan = 250000

Case “IV”

gapok = 3000000

tunjangan = 300000

Case Else

gapok = 0

tunjangan = 0

End Select

total = gapok + tunjangan

pajak = total * 0.1

Text3.Text = gapok

Text4.Text = tunjangan

Text5.Text = pajak

Text6.Text = total – pajak

End Sub

 

Private Sub Command1_Click()

Text1.SetFocus

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

Combo1.Text = “”

End Sub

 

Private Sub TEXT1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text2.SetFocus

End If

End Sub

 

Private Sub Command2_Click()

Text1.SetFocus

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

Combo1.Text = “”

End Sub

 

Private Sub Command3_Click()

Unload Me

End Sub

 

Private Sub Form_Load()

Combo1.AddItem “I”

Combo1.AddItem “II”

Combo1.AddItem “III”

Combo1.AddItem “IV”

End Sub

 

HURUF MUTU

Private Sub Combo1_CLICK()

Dim NAMA, JURUSAN, HM As String

Select Case Combo1.Text

Case “09100027”

NAMA = “AFNAN ZALFA SALSABILAA”

JURUSAN = “Sistem Informasi”

Case “09200048”

NAMA = “AMALIA AMANAH”

JURUSAN = “MANAJEMEN INFORMATIKA”

Case “09300024”

NAMA = “SASKIA MECHA”

JURUSAN = ” TEKNIK INFORMATIKA”

End Select

Text1.Text = NAMA

Text2.Text = JURUSAN

Text3.SetFocus

End Sub

 

Private Sub Command1_Click()

Dim NA As Integer

Dim HM As String

QUIS = Val(Text3.Text)

TUGAS = Val(Text4.Text)

UTS = Val(Text5.Text)

UAS = Val(Text6.Text)

NA = (QUIS + TUGAS + UTS + UAS) / 4

Text7.Text = NA

Select Case Text7.Text

Case Is > 80

HM = “A”

Case Is > 70

HM = “B”

Case Is > 60

HM = “C”

Case Is > 50

HM = “D”

Case Is > 50

HM = “E”

Case Is < 50

HM = “BL”

End Select

Text8.Text = HM

End Sub

 

 

 

Private Sub Command2_Click()

Combo1.SetFocus

Combo1.Text = “”

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

Text7.Text = “”

Text8.Text = “”

End Sub

 

Private Sub Command3_Click()

Unload Me

End Sub

 

Private Sub Form_Load()

Combo1.AddItem “09100027”

Combo1.AddItem “09200048”

Combo1.AddItem “09300024”

End Sub

 

 

Private Sub Text3_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text4.SetFocus

End If

End Sub

Private Sub Text4_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text5.SetFocus

End If

End Sub

Private Sub Text5_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text6.SetFocus

End If

End Sub

 

 

 

 

NPM

Private Sub Command1_Click()

Dim S As String

Text5.Text = “20” & Left(Text2.Text, 2)

S = Mid(Text2.Text, 3, 1)

If S = “1” Then

Text3.Text = “Sistem Informasi”

ElseIf S = “2” Then

Text3.Text = “Manajemen Informatika”

ElseIf S = “3” Then

Text3.Text = “Tehnik Informatika”

ElseIf S = “4” Then

Text3.Text = “Manajemen & Komp. Akuntansi”

End If

S = Mid(Text2.Text, 3, 1)

If S = “1” Then

Text4.Text = “Strata Satu”

ElseIf S = “2” Then

Text4.Text = “Diploma Tiga”

ElseIf S = “3” Then

Text4.Text = “Diploma Empat”

ElseIf S = “4” Then

Text4.Text = “Diploma Dua”

End If

Text6.Text = Right(Text2.Text, 3)

End Sub

 

Private Sub Command2_Click()

Text1.SetFocus

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

End Sub

 

Private Sub Command3_Click()

Text1.SetFocus

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

End Sub

 

Private Sub TEXT1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text2.SetFocus

End If

End Sub

 

Private Sub Command4_Click()

Unload Me

End Sub

 

NPM 4 DIGIT

Private Sub Cmdbatal_Click()

txtnama.SetFocus

txtnama.Text = “”

txtnpm.Text = “”

txtjur.Text = “”

txtps.Text = “”

txttm.Text = “”

txturut.Text = “”

End Sub

 

Private Sub Cmdkeluar_Click()

Unload Me

End Sub

 

Private Sub Cmdlagi_Click()

txtnama.SetFocus

txtnama.Text = “”

txtnpm.Text = “”

txtjur.Text = “”

txtps.Text = “”

txttm.Text = “”

txturut.Text = “”

End Sub

 

Private Sub Cmdproses_Click()

Dim S As String

S = Mid(txtnpm.Text, 3, 1)

If S = “1” Then

txtjur.Text = “Sistem Informasi”

ElseIf S = “2” Then

txtjur.Text = “Teknik informatika”

ElseIf S = “3” Then

txtjur.Text = “Manajemen Informatika”

ElseIf S = “4” Then

txtps.Text = “komputer akuntansi”

End If

S = Mid(txtnpm.Text, 4, 2)

If S = “01” Then

txtps.Text = “strata satu”

ElseIf S = “02” Then

txtps.Text = “diploma empat”

ElseIf S = “03” Then

txtps.Text = “diploma tiga”

ElseIf S = “04” Then

txtps.Text = “diploma dua”

End If

txttm.Text = “20” & Left(txtnpm.Text, 2)

txturut.Text = Right(txtnpm.Text, 3)

End Sub

Private Sub Form_active()

txtnama.SetFocus

txtnama.Text = “”

txtnpm.Text = “”

txtjur.Text = “”

txtps.Text = “”

txttm.Text = “”

txturut.Text = “”

End Sub

Private Sub txtnama_Keypress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtnpm.SetFocus

End If

End Sub

 

 

 

 

 

 

 

 

 

 

tugas3

TUGAS 2 VB SRI R

RUMUS
Private Sub Check1_Click()
If Check1.Value = 1 Then
Label1.FontBold = True
Else
Label1.FontBold = False
End If
End Sub

Private Sub Check2_Click()
If Check2.Value = 1 Then
Label1.FontItalic = True
Else
Label1.FontItalic = False
End If
End Sub

Private Sub Check3_Click()
If Check3.Value = 1 Then
Label1.FontUnderline = True
Else
Label1.FontUnderline = False
End If
End Sub

Private Sub Check4_Click()
If Check4.Value = 1 Then
Label1.FontStrikethru = True
Else
Label1.FontStrikethru = False
End If
End Sub

Private Sub Command1_Click()
Unload Me

End Sub

Private Sub Option1_Click()
If Option1.Value = True Then Label1.ForeColor = vbRed
End Sub

Private Sub Option2_Click()
If Option2.Value = True Then Label1.ForeColor = vbGreen
End Sub

Private Sub Option3_Click()
If Option3.Value = True Then Label1.ForeColor = vbBlue
End Sub

Private Sub Option4_Click()
If Option4.Value = True Then Label1.ForeColor = vbYellow
End Sub

tugas3 vb

VB APLIKASI P GAJI SRI R

# RUMUS
Private sub command1_Clik()
TXTGK = Val(TXTGP) + Val(TXTT) – Val(TXTPOT)
TXTP.Text = Val(TXTGK) * 0.1
TXTGD.Text = Val(TXTGK) – Val(TXTPOT)
End Sub

Private Sub Command2_Click()
TXTGP.SetFocus
TXTGK.Text = “”
TXTT.Text = “”
TXTPOT.Text = “”
TXTGP.Text = “”
TXTP.Text = “”
TXTGD.Text = “”
End Sub

Private Sub Command3_Click()
Unload Me
End Sub

Private Sub TXTGP_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TXTT.SetFocus
End If
End Sub

Private Sub TXTPOT_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TXTGK = Val(TXTGP) + Val(TXTT) – Val(TXTPOT)
TXTP.Text = Val(TXTGK) * 0.1
TXTGD.Text = Val(TXTGK) – Val(TXTPOT)

End If
End Sub

Private Sub TXTT_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TXTPOT.SetFocus
End If
End Sub

tugas3 vb

sri stmik

Private Sub Check1_Click()
Label2.FontBold = Check1.Value
End Sub

Private Sub Check2_Click()
Label2.FontItalic = Check2.Value
End Sub

Private Sub Check3_Click()
Label2.FontUnderline = Check3.Value
End Sub

Private Sub Check4_Click()
Label2.FontStrikethru = Check4.Value
End Sub

Private Sub Command1_Click()
Label2.Caption = Text1.Text
End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Option1_Click()
Label2.ForeColor = vbBlue
End Sub

Private Sub Option2_Click()
Label2.ForeColor = vbRed
End Sub

Private Sub Option3_Click()
Label2.ForeColor = vbGreen
End Sub

Private Sub Option4_Click()
Label2.ForeColor = vbYellow
End Sub

WEBSITE3 TUGAS 2 VB

DISCOUNTprogram kalkulatorpenjumlahan 2 bilanganF1

 

 

 

 

 

 

 

 

RUMUS BUKU DATA

 

 

Private Sub Command1_Click()

Text1.SetFocus

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

End Sub

 

Private Sub Command2_Click()

Text1.SetFocus

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

End Sub

 

Private Sub Command3_Click()

Unload Me

End Sub

 

Private Sub Text1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text2.SetFocus

End If

End Sub

 

Private Sub Text2_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text3.SetFocus

End If

End Sub

Private Sub Text3_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text4.SetFocus

End If

End Sub

Private Sub Text4_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text5.SetFocus

End If

End Sub

 

 

 

 

 

 

 

 

 

 

 

 

# rumus penjumlahan 2 bilangan #

Private Sub Command1_Click()

Dim a, b, c As Single

a = Text1.Text

b = Text2.Text

c = a * b

Text3.Text = c

End Sub

 

Private Sub Command2_Click()

Text1.SetFocus

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

End Sub

 

 

Private Sub Command3_Click()

Unload Me

End Sub

 

Private Sub Text1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text2.SetFocus

End If

End Sub

 

Private Sub Text2_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Dim a, b, c As Single

a = Text1.Text

b = Text2.Text

c = a * b

Text3.Text = c

End If

End Sub

 

 

 

 

 

RUMUS KALKULATOR

Private Sub Command1_Click()

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

Text10.Text = Val(Text3.Text) * Val(Text4.Text)

Text11.Text = Val(Text5.Text) / Val(Text6.Text)

Text12.Text = Val(Text7.Text) – Val(Text8.Text)

End Sub

Private Sub Command2_Click()

Text1.SetFocus

Text1.Text = “”

Text10.Text = “”

Text6.Text = “”

Text2.Text = “”

Text3.Text = “”

Text9.Text = “”

Text5.Text = “”

Text4.Text = “”

Text7.Text = “”

Text8.Text = “”

Text11.Text = “”

Text12.Text = “”

End Sub

 

Private Sub Command3_Click()

Text1.SetFocus

Text1.Text = “”

Text10.Text = “”

Text6.Text = “”

Text2.Text = “”

Text3.Text = “”

Text9.Text = “”

Text5.Text = “”

Text4.Text = “”

Text7.Text = “”

Text8.Text = “”

Text11.Text = “”

Text12.Text = “”

End Sub

 

Private Sub Command4_Click()

Unload Me

End Sub

 

Private Sub Text1_KeyPress(keyascii As Integer)

If keyascii = 13 Then

Text2.SetFocus

End If

End Sub

 

Private Sub Text3_KeyPress(keyascii As Integer)

If keyascii = 13 Then

Text4.SetFocus

End If

End Sub

Private Sub Text4_KeyPress(keyascii As Integer)

If keyascii = 13 Then

Dim a, b, c As Single

a = Text3.Text

b = Text4.Text

c = Val(Text3.Text) * Val(Text4.Text)

Text10.Text = c

Text5.SetFocus

End If

 

End Sub

 

Private Sub Text2_KeyPress(keyascii As Integer)

If keyascii = 13 Then

Dim a, b, c As Single

a = Text1.Text

b = Text2.Text

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

Text9.Text = c

Text3.SetFocus

End If

End Sub

 

 

Private Sub Text5_KeyPress(keyascii As Integer)

If keyascii = 13 Then

Text6.SetFocus

End If

End Sub

 

Private Sub Text6_KeyPress(keyascii As Integer)

If keyascii = 13 Then

Dim a, b, c As Single

a = Text5.Text

b = Text6.Text

c = Val(Text5.Text) / Val(Text6.Text)

Text11.Text = c

Text7.SetFocus

End If

End Sub

 

Private Sub Text7_keypress(keyascii As Integer)

If keyascii = 13 Then

Text8.SetFocus

End If

End Sub

 

Private Sub Text8_keypress(keyascii As Integer)

If keyascii = 13 Then

Dim a, b, c As Single

a = Text7.Text

b = Text8.Text

c = Val(Text7.Text) – Val(Text8.Text)

Text12.Text = c

Text1.SetFocus

End If

End Sub

 

 

 

RUMUS DISCOUNT

Private Sub Command1_Click()

Dim A, B, C As Single

A = Text1.Text

B = Text2.Text

C = A * 0.1

 

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

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

End Sub

 

Private Sub Command2_Click()

Text1.SetFocus

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

End Sub

 

Private Sub Command3_Click()

Unload Me

End Sub

 

Private Sub Text1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Dim A, B, C As Single

A = Text1.Text

B = Text2.Text

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

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

End If

End Sub

 

website 3 ( tugas visual basic )

RUMUS BUKU DATA

Private Sub Command1_Click()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text4.Text = “”
Text5.Text = “”
End Sub

Private Sub Command2_Click()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text4.Text = “”
Text5.Text = “”
End Sub

Private Sub Command3_Click()
Unload Me
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text3.SetFocus
End If
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text4.SetFocus
End If
End Sub
Private Sub Text4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text5.SetFocus
End If
End Sub

Private Sub Command1_Click()
Dim a, b, c As Single
a = Text1.Text
b = Text2.Text
c = a * b
Text3.Text = c
End Sub

Private Sub Command2_Click()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
End Sub

Private Sub Command3_Click()
Unload Me
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Dim a, b, c As Single
a = Text1.Text
b = Text2.Text
c = a * b
Text3.Text = c
End If
End Sub

Private Sub Command1_Click()
Text9.Text = Val(Text1.Text) + Val(Text2.Text)
Text10.Text = Val(Text3.Text) * Val(Text4.Text)
Text11.Text = Val(Text5.Text) / Val(Text6.Text)
Text12.Text = Val(Text7.Text) – Val(Text8.Text)
End Sub
Private Sub Command2_Click()
Text1.SetFocus
Text1.Text = “”
Text10.Text = “”
Text6.Text = “”
Text2.Text = “”
Text3.Text = “”
Text9.Text = “”
Text5.Text = “”
Text4.Text = “”
Text7.Text = “”
Text8.Text = “”
Text11.Text = “”
Text12.Text = “”
End Sub

Private Sub Command3_Click()
Text1.SetFocus
Text1.Text = “”
Text10.Text = “”
Text6.Text = “”
Text2.Text = “”
Text3.Text = “”
Text9.Text = “”
Text5.Text = “”
Text4.Text = “”
Text7.Text = “”
Text8.Text = “”
Text11.Text = “”
Text12.Text = “”
End Sub

Private Sub Command4_Click()
Unload Me
End Sub

Private Sub Text1_KeyPress(keyascii As Integer)
If keyascii = 13 Then
Text2.SetFocus
End If
End Sub

Private Sub Text3_KeyPress(keyascii As Integer)
If keyascii = 13 Then
Text4.SetFocus
End If
End Sub
Private Sub Text4_KeyPress(keyascii As Integer)
If keyascii = 13 Then
Dim a, b, c As Single
a = Text3.Text
b = Text4.Text
c = Val(Text3.Text) * Val(Text4.Text)
Text10.Text = c
Text5.SetFocus
End If

End Sub

Private Sub Text2_KeyPress(keyascii As Integer)
If keyascii = 13 Then
Dim a, b, c As Single
a = Text1.Text
b = Text2.Text
c = Val(Text1.Text) + Val(Text2.Text)
Text9.Text = c
Text3.SetFocus
End If
End Sub

Private Sub Text5_KeyPress(keyascii As Integer)
If keyascii = 13 Then
Text6.SetFocus
End If
End Sub

Private Sub Text6_KeyPress(keyascii As Integer)
If keyascii = 13 Then
Dim a, b, c As Single
a = Text5.Text
b = Text6.Text
c = Val(Text5.Text) / Val(Text6.Text)
Text11.Text = c
Text7.SetFocus
End If
End Sub

Private Sub Text7_keypress(keyascii As Integer)
If keyascii = 13 Then
Text8.SetFocus
End If
End Sub

Private Sub Text8_keypress(keyascii As Integer)
If keyascii = 13 Then
Dim a, b, c As Single
a = Text7.Text
b = Text8.Text
c = Val(Text7.Text) – Val(Text8.Text)
Text12.Text = c
Text1.SetFocus
End If
End Sub

Private Sub Command1_Click()
Dim A, B, C As Single
A = Text1.Text
B = Text2.Text
C = A * 0.1

Text2.Text = Val(Text1.Text) * 0.1
Text3.Text = Val(Text1.Text) – Val(Text2.Text)
End Sub

Private Sub Command2_Click()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
End Sub

Private Sub Command3_Click()
Unload Me
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Dim A, B, C As Single
A = Text1.Text
B = Text2.Text
Text2.Text = Val(Text1.Text) * 0.1
Text3.Text = Val(Text1.Text) – Val(Text2.Text)
End If
End Sub

website 3