DATA MAHASISWA 1

Private Sub combatal_Click()
txtnpm.SetFocus
txtnpm = “”
Txtnama = “”
Txtjurusan = “”
Txtalamat = “”
txtps = “”
End Sub

Private Sub comkeluar_Click()
End
End Sub

Private Sub comlagi_Click()
txtnpm.SetFocus
txtnpm = “”
Txtnama = “”
Txtjurusan = “”
Txtalamat = “”
txtps = “”
End Sub

Private Sub Txtalmt_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtps.SetFocus
End If
End Sub

Private Sub Txtjrsn_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txtalmt.SetFocus
End If
End Sub

Private Sub Txtnm_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txtjrsn.SetFocus
End If
End Sub

Private Sub Txtalamat_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtps.SetFocus
End If
End Sub

Private Sub Txtjurusan_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txtalamat.SetFocus
End If
End Sub
Private Sub Txtnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txtjurusan.SetFocus
End If
End Sub

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

Private Sub txtps_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
comlagi.SetFocus
End If
End Sub

Tuliskan nama Anda

 

 

Private Sub Chkmiring_Click()

Label2.FontItalic = Chkmiring.Value

End Sub

 

Private Sub Chktebal_Click()

Label2.FontBold = Chktebal.Value

End Sub

 

Private Sub Command1_Click()

Label2.Caption = Txt1.Text

 

End Sub

 

Private Sub Command2_Click()

End

End Sub

 

Private Sub Opbiru_Click()

Label2.ForeColor = vbBlue

End Sub

 

Private Sub Opmerah_Click()

Label2.ForeColor = vbRed

End Sub

PERKALIAN

 

Private Sub Combersih_Click()

Txt1.SetFocus

Txt1 = “”

Txt2 = “”

Txthasil = “”

End Sub

 

Private Sub Comhitung_Click()

Txthasil = Val(Txt1.Text) * Val(Txt2.Text)

Combersih.SetFocus

End Sub

 

Private Sub Comkeluar_Click()

End

End Sub

 

Private Sub Txt1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txt2.SetFocus

End If

End Sub

Private Sub Txt2_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txthasil = Val(Txt1.Text) * Val(Txt2.Text)

Comhitung.SetFocus

End If

End Sub

NIDN

 

Private Sub Cbogolongan_Click()

Dim gaji, pajak, tunjangan, total As Variant

Select Case Cbogolongan.Text

Case “I”

gaji = 2000000

tunjangan = 200000

Case “II”

gaji = 3000000

tunjangan = 300000

Case “III”

gaji = 4000000

tunjangan = 400000

Case “IV”

gaji = 4000000

tunjangan = 400000

Case Else

gaji = 0

tunjangan = 0

End Select

total = gaji + tunjangan

pajak = total * 0.1

Txtgaji.Text = gaji

Txttunjangan.Text = tunjangan

Txtpajak.Text = pajak

Txttotal.Text = total – pajak

 

End Sub

 

Private Sub Combatal_Click()

Txtnind.SetFocus

Txtnind.Text = “”

Txtnama.Text = “”

Cbogolongan.Text = “”

Txtgaji.Text = “”

Txttunjangan.Text = “”

Txtpajak.Text = “”

Txttotal.Text = “”

End Sub

 

Private Sub Comkeluar_Click()

Unload Me

End Sub

 

Private Sub Comlagi_Click()

Txtnind.SetFocus

Txtnind.Text = “”

Txtnama.Text = “”

Cbogolongan.Text = “”

Txtgaji.Text = “”

Txttunjangan.Text = “”

Txtpajak.Text = “”

Txttotal.Text = “”

End Sub

 

Private Sub Form_Load()

Cbogolongan.AddItem “I”

Cbogolongan.AddItem “II”

Cbogolongan.AddItem “III”

Cbogolongan.AddItem “IV”

End Sub

Private Sub Txtnama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Cbogol.SetFocus

End If

End Sub

 

Private Sub Txtnind_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txtnama.SetFocus

End If

End Sub

NAMA & npm

 

Private Sub Combatal_Click()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

Txtjurusan.Text = “”

Txtps.Text = “”

Txttm.Text = “”

Txtnu.Text = “”

End Sub

 

Private Sub Comkeluar_Click()

Unload Me

End Sub

 

Private Sub Comlagi_Click()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

Txtjurusan.Text = “”

Txtps.Text = “”

Txttm.Text = “”

Txtnu.Text = “”

End Sub

Private Sub Comproses_Click()

Dim s As String

Txttm.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 = “Manajemen Informatika”

ElseIf s = “3” Then

Txtjurusan.Text = “Tehnik Informatika”

ElseIf s = “4” Then

Txtjurusan.Text = “Komp. Akuntansi”

End If

s = Mid(Txtnpm.Text, 4, 2)

If s = “01” Then

Txtps.Text = “strata satu”

ElseIf s = “02” Then

Txtps.Text = “Diploma Tiga”

ElseIf s = “03” Then

Txtps.Text = “Diploma Dua”

ElseIf s = “04” Then

Txtps.Text = “Diploma Satu”

End If

Txtnu.Text = Right(Txtnpm.Text, 3)

End Sub

Private Sub Form_Activate()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

Txtjurusan.Text = “”

Txtps.Text = “”

Txttm.Text = “”

Txtnu.Text = “”

End Sub

 

Private Sub Txtnama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txtnpm.SetFocus

End If

End Sub

HURUF MUTU

 

Private Sub Combatal_Click()

Comnpm.SetFocus

Comnpm.Text = “”

Txtnama.Text = “”

Txtjurusan.Text = “”

Txtquis.Text = “”

Txttugas.Text = “”

Txtuts.Text = “”

Txtuas.Text = “”

Txtna.Text = “”

Txthm.Text = “”

End Sub

 

Private Sub Comkeluar_Click()

Unload Me

End Sub

Private Sub Comnpm_Click()

Dim nama, jurusan, hm As String

Select Case Comnpm.Text

Case “12101123”

nama = “Indah Mega Natalia”

jurusan = “Sistem Informasi”

Case “12202124”

nama = “Susi Sundari”

jurusan = “Manajemen Informatika”

Case “12303125”

nama = “Ardi Firmansyah”

jurusan = “Tehnik Informatika”

End Select

Txtnama.Text = nama

Txtjurusan.Text = jurusan

Txtquis.SetFocus

End Sub

 

Private Sub Comproses_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()

Comnpm.AddItem “12101123”

Comnpm.AddItem “12202124”

Comnpm.AddItem “12303125”

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

HARGA DISKON

 

Private Sub Comhitung_Click()

Dim ha, dis, akhir As Double

Txtdis.Text = Val(Txtha.Text) * 0.2

Txtakhir.Text = Val(Txtha.Text) – Val(Txtdis.Text)

End Sub

 

Private Sub Comkeluar_Click()

End

End Sub

 

Private Sub Comulang_Click()

Txtha = “”

Txtdis = “”

Txtakhir = “”

End Sub

Private Sub Txtha_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txtdis.SetFocus

End If

End Sub