Kode program
Private Sub cmdbatal_Click()
Unload Me
End Sub
Private Sub cmdkeluar_Click()
End
End Sub
Private Sub cmdlagi_Click()
txtgol = “”
txtks = “”
txtstatus = “”
txttahun = “”
txtjabatan = “”
txtbagian = “”
txtgapok = “”
txttj = “”
txttg = “”
txtterbilang = “”
Txtnama = “”
Txtnik = “”
End Sub
Private Sub cmdproses_Click()
Dim NIK As String
NIK = Left(Txtnik.Text, 1)
If NIK = “A” Then
txtgol.Text = “A”
txtjabatan.Text = “manajer”
txtgapok.Text = “2500000″
txttj.Text = “6500000″
ElseIf NIK = “B” Then
txtgol.Text = “B”
txtjabatan.Text = “kepala seksi”
txtgapok.Text = “1500000″
txttj.Text = “365000″
ElseIf NIK = “C” Then
txtgol.Text = “C”
txtjabatan.Text = “staff”
txtgapok.Text = “100000″
txttj.Text = “250000″
End If
NIK = Mid(Txtnik.Text, 4, 2)
txttahun.Text = NIK
NIK = Right(Txtnik.Text, 1)
If NIK = “S” Then
txtks.Text = “S”
txtstatus.Text = “single”
ElseIf NIK = “M” Then
txtks.Text = “M”
txtstatus = “menikah”
ElseIf NIK = “D” Then
txtks.Text = “D”
txtstatus.Text = “Duda”
ElseIf NIK = “J” Then
txtks.Text = “J”
txtstatus.Text = “janda”
End If
NIK = Mid(Txtnik.Text, 6, 3)
If NIK = “SDM” Then
txtbagian.Text = “general Affair”
ElseIf NIK = “KEU” Then
txtbagian.Text = “Accounting”
ElseIf NIK = “EDP” Then
txtbagian.Text = “IT UNIT”
ElseIf NIK = “SPM” Then
txtbagian.Text = “security”
ElseIf NIK = “ADM” Then
txtbagian.Text = “Administrasi”
End If
txttg.Text = Val(txtgapok.Text) + Val(txttj.Text)
End Sub
KODE PROGRAM
Private Sub cmdbatal_Click()
txtkb.Text = “”
txtnb.Text = “”
txtjs.Text = “”
txttj.Text = “”
txthj.Text = “”
txtth.Text = “”
txtkb.SetFocus
End Sub
Private Sub cmdkeluar_Click()
Unload Me
End Sub
Private Sub Cmdproses_Click()
Dim KB As String
KB = Right(txtkb.Text, 1)
If KB = “T” Then
txtnb.Text = “TAPE”
txthj.Text = “275000”
ElseIf KB = “S” Then
txtnb.Text = “SOUNDSYSTEM”
txthj.Text = “350000”
ElseIf KB = “C” Then
txtnb.Text = “COMPACT”
txthj.Text = “480000”
txtjs.SetFocus
End If
End Sub
Private Sub txtjs_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txttj.SetFocus
End If
End Sub
Private Sub txttj_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtss.Text = Val(txtjs.Text) – Val(txttj.Text)
txtth.Text = Val(txttj.Text) * Val(txthj.Text)
End If
End Sub
Kode …
tugas visual basic (VB)
KODE PROGRAM
Private Sub cmdbatal_Click()
TXTnama.SetFocus
TXTnama.Text = “”
txtjur.Text = “”
txtps.Text = “”
txttm.Text = “”
txtnpm.Text = “”
txturut.Text = “”
End Sub
Private Sub cmdkeluar_Click()
Unload Me
End Sub
Private Sub cmdlagi_Click()
TXTnama.SetFocus
TXTnama.Text = “”
txtjur.Text = “”
txtps.Text = “”
txttm.Text = “”
txtnpm.Text = “”
txturut.Text = “”
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”
ElseIf s = “3” Then
txtjur.Text = “Tehnik Informatika”
ElseIf s = “4” Then
txtjur.Text = “Manajemen & Komp. Akuntansi”
End If
s = Mid(txtnpm.Text, 4, 2)
If s = “00” Then
txtps.Text = “Strata Satu”
ElseIf s = “02” Then
txtps.Text = “Diploma Tiga”
ElseIf s = “03” Then
txtps.Text = “Diploma Empat”
ElseIf s = “04” Then
txtps.Text = “Diploma Dua”
End If
txturut.Text = Right(txtnpm.Text, 3)
End Sub
Private Sub Form_activate()
TXTnama.SetFocus
TXTnama.Text = “”
txtjur.Text = “”
txtps.Text = “”
txttm.Text = “”
txtnpm.Text = “”
txturut.Text = “”
End Sub
Private Sub TXTnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnpm.SetFocus
End If
End Sub
TUGAS VISUAL BASIC (VB)
KODE PROGRAM
Private Sub CBONPM_Click()
Dim nama, jurusan, hm As String
Select Case CBONPM.Text
Case “11100153”
nama = “YUSMA WATI”
jurusan = “SISTEM INFORMASI”
Case “11100148”
nama = “MUHAMMAD PURWADI”
jurusan = “SISTEM INFORMASI”
Case “11100152”
nama = “NOVI PANCA ANGGRAINI”
jurusan = “SISTEM INFORMASI”
End Select
TXTNAMA.Text = nama
TXTJURUSAN.Text = jurusan
TXTQUIS.SetFocus
End Sub
Private Sub CMDBERSIH_Click()
CBONPM.Text = “”
TXTNAMA.Text = “”
TXTJURUSAN.Text = “”
TXTQUIS.Text = “”
TXTTUGAS.Text = “”
TXTUTS.Text = “”
TXTUAS.Text = “”
TXTNA.Text = “”
TXTHM.Text = “”
CBONPM.SetFocus
End Sub
Private Sub CMDKELUAR_Click()
Unload Me
End Sub
Private Sub CMDPROSES_Click()
Dim na As Integer
Dim hm As String
quis = Val(TXTQUIS.Text)
tugas = Val(TXTTUGAS.Text)
uts = Val(TXTUTS.Text)
uas = Val(TXTUAS.Text)
na = (quis + tugas + uts + uas) / 4
TXTNA.Text = na
Select Case TXTNA.Text
Case Is > 80
hm = “A”
Case Is > 70
hm = “B”
Case Is > 60
hm = “C”
Case Is > 50
hm = “D”
Case Is > 40
hm = “E”
End Select
TXTHM.Text = hm
End Sub
Private Sub Form_Load()
CBONPM.AddItem “11100153”
CBONPM.AddItem “11100148”
CBONPM.AddItem “11100152”
End Sub
Private Sub TXTQUIS_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TXTTUGAS.SetFocus
End If
End Sub
Private Sub TXTTUGAS_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TXTUTS.SetFocus
End If
End Sub
Private Sub TXTUTS_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TXTUAS.SetFocus
End If
End Sub
Hello world!
Welcome to WordPress.com. After you read this, you should delete and write your own post, with a new title above. Or hit Add New on the left (of the admin dashboard) to start a fresh post.
Here are some suggestions for your first post.
- You can find new ideas for what to blog about by reading the Daily Post.
- Add PressThis to your browser. It creates a new blog post for you about any interesting page you read on the web.
- Make some changes to this page, and then hit preview on the right. You can always preview any post or edit it before you share it to the world.