Rabu, 13 Desember 2017

Tugas 3.3


Private Sub Cmdproses_Click()
Dim S As String
Txttm.Text = "20" & Left(Txtnpm, 2)
S = Mid(Txtnpm, 3, 1)
If S = "1" Then
txtjur = "Sistem Informasi"
txtps = "Diploma Dua"
ElseIf S = "2" Then
txtjur = "Manajemen"
txtps = "Strata Satu"
ElseIf S = "3" Then
txtjur = "Tehnik Informatika"
txtps = "Diploma Tiga"
ElseIf S = "4" Then
txtjur = "Komp. Akuntansi"
txtps = "Diploma Empat"
End If
txturut = Right(Txtnpm.Text, 4)
End Sub

Private Sub CmdBatal_Click()
Txtnama = ""
Txtnpm = ""
txtjur = ""
txtps = ""
txturut = ""
Txttm = ""
End Sub

Private Sub Cmdkeluar_Click()
Unload Me
End Sub

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

Tugas 3.2 BP1


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 = "01" 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 CmdBatal_Click()
Txtnama = ""
Txtnpm = ""
txtjur = ""
txtps = ""
txturut = ""
Txttm = ""
End Sub

Private Sub Cmdkeluar_Click()
Unload Me
End Sub


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

Tugas 3.1 BP1

Private Sub Command1_Click()
Text1 = ""
Text2 = ""
Text3 = ""
Text4 = ""
Text5 = ""
Text6 = ""
Combo1 = ""
End Sub

Private Sub Form_load()
Combo1.AddItem "I"
Combo1.AddItem "II"
Combo1.AddItem "III"
Combo1.AddItem "IV"
End Sub


Private Sub Command2_Click()
Text1 = ""
Text2 = ""
Text3 = ""
Text4 = ""
Text5 = ""
Text6 = ""
Combo1 = ""
End Sub

Private Sub Command3_Click()
Unload Me
End Sub

Private Sub combo1_Click()
Dim gapok, pajak, tunjangan, total As Variant
Select Case Combo1.Text
Case "I"
gapok = 6000000
tunjangan = 250000
Case "II"
gapok = 7000000
tunjangan = 250000
Case "III"
gapok = 5500000
tunjangan = 250000
Case "IV"
gapok = 3000000
tunjangan = 300000
Case Else
gapok = 0
tunjangan = 0
End Select
total = gapok + tunjangan
pajak = total * 0.1
Text3= gapok
Text4 = tunjangan
Text5 = pajak
Text6 = total - pajak
End Sub


Rabu, 22 November 2017

Tugas 2 Program 8 Bp1



Private Sub Form_Load()
Cbonpm.AddItem "17100075"
Cbonpm.AddItem "17200089"
Cbonpm.AddItem "16300212"
Cbonpm.AddItem "17400056"
Cbonpm.AddItem "15400586"
End Sub

Private Sub txtnq_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnt.SetFocus
End If
End Sub

Private Sub txtnt_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
Private Sub txtuas_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtuas.SetFocus
Dim NA As Integer
Dim HM As String
QUIS = Val(txtnq)
TUGAS = Val(txtnt)
UTS = Val(txtuts)
UAS = Val(txtuas)
NA = (QUIS + TUGAS + UTS + UAS) / 4
txtna.Text = NA


Select Case txtna
 Case Is = 100
 HM = "A"
 Case Is >= 80
 HM = "A"
 Case Is >= 70
 HM = "B"
 Case Is >= 60
 HM = "C"
 Case Is >= 50
 HM = "D"
 Case Is <= 49
 HM = "E"
  End Select
  txthm.Text = HM
End If
End Sub

Private Sub Cbonpm_Click()
Dim nama, jurusan, HM As String

Select Case Cbonpm
 Case "17100075"
 nama = "DWI AGUNG CAHYADI"
 jurusan = "Sistem Informasi"
 Case "17200089"
 nama = "IMAMUDDIN"
 jurusan = "Manajemen Informatika"
 Case "16300212"
 nama = "SUKINEM"
 jurusan = "Tehnik Sipil"
 Case "17400056"
 nama = "SAKIR KECIL"
 jurusan = "Tehnik Informatika"
 Case "15400586"
 nama = "MBAH WAGU"
 jurusan = "MANAGEMENT SISTEM INFORMASI"
 End Select
 txtnm = nama
 txtjr = jurusan
 txtnq.SetFocus
 End Sub

Private Sub Cmdbatal_Click()
Cbonpm.SetFocus
Cbonpm = ""
txtnm = ""
txtjr = ""
txtnq = ""
txtnt = ""
txtuts = ""
txtuas = ""
txtna = ""
txthm = ""
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)
TUGAS = Val(txttugas)
UTS = Val(txtuts)
UAS = Val(txtuas)
NA = (QUIS + TUGAS + UTS + UAS) / 4
txtna.Text = NA

Select Case txtna
 Case Is = 100
 HM = "A"
 Case Is >= 80
 HM = "A"
 Case Is >= 70
 HM = "B"
 Case Is >= 60
 HM = "C"
 Case Is >= 50
 HM = "D"
 Case Is <= 49
 HM = "E"
  End Select
  txthm.Text = HM
 End Sub