Tugas VB 5

norma

Private Sub CMDgomangBARU_Click()

Data1.Recordset.AddNew

TXTgomangNAMA.SetFocus

End Sub

 

Private Sub CMDgomangHAPUS_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub CMDgomangKEL_Click()

Unload Me

End Sub

 

Private Sub CMDgomangPROSES_Click()

Dim S As String

TXTgomangTM.Text = “20” & Left(TXTgomangNPM.Text, 2)

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

If S = “1” Then

JUR = “Sistem Informasi”

ElseIf S = “2” Then

JUR = “Manajemen Informatika”

ElseIf S = “3” Then

JUR = “Tehnik Informatika”

ElseIf S = “4” Then

JUR = “Manajemen & Komp. Akuntansi”

End If

TXTgomangJUR.Text = JUR

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

If S = “00” Then

PS = “Strata Satu”

ElseIf S = “01” Then

PS = “Diploma Tiga”

ElseIf S = “02” Then

PS = “Diploma Empat”

ElseIf S = “03” Then

PS = “Diploma Dua”

End If

TXTgomangPS.Text = PS

TXTgomangNU.Text = Right(TXTgomangNPM.Text, 3)

End Sub

 

 

Private Sub CMDgomangSIMPAN_Click()

Data1.Recordset.Update

End Sub

 

Advertisements
Posted in Uncategorized | Leave a comment

VISUAL BASIC PT.PPPP

Tugas Visual basic PT.Pulang Petang Pergi Pagi

NORMA
Private Sub Cmdcan_Click()
txtnm.SetFocus
txtnm.Text = “”
txtnik.Text = “”
End Sub

Private Sub Cmdpro_Click()
Dim jbt, bg As String
Dim gp, tj, tg As Currency
txttahun.Text = Left(txtnik.Text, 4)
G = Mid(txtnik.Text, 5, 1)
If G = “A” Then
G = “A”
jbt = ” MANAGER”
gp = “1000000”
tj = “200000”
ElseIf G = “B” Then
G = “B”
jbt = ” Seksi Banget”
gp = “400000”
tj = “200000”
ElseIf G = “C” Then
G = “C”
jbt = ” setaf”
gp = “300000”
tj = “1000”
ElseIf G = “D” Then
G = “D”
jbt = ” Juru Parkir”
gp = “200000”
tj = “100000”
ElseIf G = “E” Then
G = “E”
jbt = ” Juru Kunci”
gp = “1000”
tj = “1000”
End If
txtgol.Text = G
txtjbt.Text = jbt
txtgp.Text = gp
txttj.Text = tj
KS = Mid(txtnik.Text, 7, 1)
If KS = “S” Then
KS = “S”
ksta = ” SINGGLE”
ElseIf KS = “B” Then
KS = “B”
ksta = “BERDUA”
ElseIf KS = “D” Then
KS = “D”
ksta = “DUDA”
ElseIf KS = “J” Then
KS = “J”
ksta = “JANDA”
ElseIf KS = “BA” Then
KS = “BA”
ksta = “BANYAK ANAK”
End If
txtks.Text = KS
txtksta.Text = ksta
tg = Val(txtgp.Text) + Val(txttj.Text)
txttg.Text = tg
B = Right(txtnik.Text, 3)
If B = “KEU” Then
txtbg.Text = “AKUNTING”
ElseIf B = “ADM” Then
txtbg.Text = “ADMINISTRASI”
ElseIf B = “SDM” Then
txtbg.Text = “SUMBER DAYA MANUSIA”
ElseIf B = “EDP” Then
txtbg.Text = “IT UNIT”
ElseIf B = “SPM” Then
txtbg.Text = “KEAMANAN”
End If
End Sub
Private Sub Cmdquit_Click()
Unload Me
End Sub

Private Sub Cmdrep_Click()
txtnm.SetFocus
txtnm.Text = “”
txtnikText = “”
txtgol.Text = “”
txtjbt.Text = “”
txtgp.Text = “”
txttj.Text = “”
txtks.Text = “”
txtksta.Text = “”
txttg.Text = “”
txtbg.Text = “”
txttahun.Text = “”
End Sub

Private Sub txtnm_keypre()

End Sub

Private Sub txtnm_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnik.SetFocus
End If
End Sub

Private Sub txtnik_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Cmdpro.SetFocus
End If
End Sub

Posted in Uncategorized | Leave a comment

VISUAL BASIC DATA NPM MAHASISWA

Private Sub Cmdinput_Click()
Dim S As String
Txtth.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
Txtprog.Text = “Strata Satu”
ElseIf S = “02″ Then
Txtprog.Text = “Diploma Tiga”
ElseIf S = “03″ Then
Txtprog.Text = “Diploma Empat”
ElseIf S = “04″ Then
Txtprog.Text = “Diploma Dua”
End If
Txtnor.Text = Right(Txtnpm.Text, 3)
End Sub

Private Sub Cmdout_Click()
Unload Me
End Sub

Private Sub Cmdreset_Click()
Txtnm.SetFocus
Txtnm.Text = “”
Txtnpm.Text = “”
Txtjur.Text = “”
Txtprog.Text = “”
Txtth.Text = “”
Txtnor.Text = “”
End Sub

Private Sub Txtnm_Keypress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txtnpm.SetFocus
End If
End Sub

Private Sub Txtnpm_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Cmdinput.SetFocus
End If
End Sub

 

HASILNYA

NORMA

Posted in Uncategorized | Leave a comment

VISUAL BASIC HURUF MUTU

Private Sub Cbonpm_Click()

Dim nama, jurusan, HM As String

 

Select Case Cbonpm.Text

Case “12100207”

nama = “NORMA AZIZAH”

jurusan = “Sistem Informasi”

Case “09200048”

nama = “SASCIA MECA”

jurusan = “Manajemen Informatika”

Case “09300024”

nama = “SASKIA MECHA”

jurusan = “Tehnik Informatika”

End Select

txtnama.Text = nama

txtjurusan.Text = jurusan

txtquis.SetFocus

End Sub

Private Sub Cmdbatal_Click()

Cbonpm.SetFocus

Cbonpm.Text = “”

txtnama.Text = “”

txtjurusan.Text = “”

txtquis.Text = “”

txttugas.Text = “”

txtuts.Text = “”

txtuas.Text = “”

txtna.Text = “”

txthm.Text = “”

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 < 50

HM = “E”

End Select

txthm.Text = HM

End Sub

Private Sub Form_Load()

Cbonpm.AddItem “09100027”

Cbonpm.AddItem “09200048”

Cbonpm.AddItem “09300024”

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

HASILNYA

 

images

 

Posted in Uncategorized | Leave a comment

VISUAL BASIC KE 7

program VB HURUF timbul,,maksudnya ketika mengetikkan huruf maka akan muncul huruf yang kita ketiikan seperti gambar dibawah ini

untitledUntuk membuat program seperti diatas  mosukan kode listing dibawah ini…

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

Private Sub Check2_Click()
Label2.FontItalic = Check2.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 Text1_Change()

End Sub

 

selamat menikmati,,,hehehhe

Posted in Uncategorized | Leave a comment

Visual Basic Tugas ke 6

program visual Basic NAMA KARYAWAN DAN GAJI

Private Sub cbogolongan_Click()
Dim gapok, pajak, tunjangan, total As Variant
Select Case Cbogolongan.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
txtgapok.Text = gapok
txttunjangan.Text = tunjangan
txtpajak.Text = pajak
txttotal.Text = total – pajak
End Sub
Private Sub Cmdbatal_Click()
kosong
End Sub

Private Sub Cmdkeluar_Click()
Unload Me
End Sub
Private Sub Cmdlagi_Click()
kosong
End Sub
Private Sub Form_load()
Cbogolongan.AddItem “I”
Cbogolongan.AddItem “II”
Cbogolongan.AddItem “III”
Cbogolongan.AddItem “IV”
End Sub

Public Sub kosong()
txtnidn.Text = Clear
txtnama.Text = Clear
Cbogolongan.Text = Clear
txtgapok.Text = Clear
txttunjangan.Text = Clear
txtpajak.Text = Clear
txttotal.Text = Clear
txtnidn.SetFocus
End Sub

 Private Sub txtnidn_keypress(keyascii As Integer)

If keyascii = 13 Then
txtnama.SetFocus
End If
End Sub

HASILNYA

n

Posted in Uncategorized | Leave a comment

tugas visual basic

TUGAS VISUAL BASIC 1: MEMBUAT PROGRAM 2 BILANGAN
Sekarang ane mau posting tentang bagaimana caranya membuat program perkalian 2 bilangan menggunakan visual basic, seperti gambar berikut, yuk ikutin caranya. Continue reading

Posted in Uncategorized | Leave a comment