PENGHITUNGAN GAJI KARYAWAN
Private Sub Form_Load()Combo1.AddItem “I”Combo1.AddItem “II”
Combo1.AddItem “III” Combo1.AddItem “IV” End Sub
|
Private Sub Command3_Click()Unload MeEnd Sub |
Private Sub Combo1_Click()Dim a, b, c, d As VariantSelect Case Combo1.Text
Case “I” a = 1500000 b = 0.1 * a Case “II” a = 2000000 b = 0.1 * a Case “III” a = 2500000 b = 0.1 * a
|
Case “IV”a = 3000000b = 0.1 * a
Case Else a = 0 b = 0 End Select c = (0.1 * b) + (b) d = (a) – (c – b) Text3.Text = a Text4.Text = b Text5.Text = c Text6.Text = d End Sub |
Private Sub Command1_Click()Text1.Text = “”Text2.Text = “”
Text3.Text = “” Text4.Text = “” Text5.Text = “” Text6.Text = “” Combo1.Text = “” Text1.SetFocus End Sub |
Private Sub Command2_Click()Text1.Text = “”Text2.Text = “”
Text3.Text = “” Text4.Text = “” Text5.Text = “” Text6.Text = “” Combo1.Text = “” Text1.SetFocus End Sub |
Private Sub Text1_KeyPress(KeyAscii As Integer)If KeyAscii = 13 ThenText2.SetFocus
End If End Sub |
Private Sub Text2_KeyPress(KeyAscii As Integer)If KeyAscii = 13 ThenCombo1.SetFocus
End If End Sub |
HURUF MUTU MAHASISWA STMIK PRINGSEWU
Private Sub Form_Load()Combo1.AddItem “11100012” |
Combo1.AddItem “11201012”
Combo1.AddItem “11301012”
End Sub
Private Sub Combo1_Click()
Dim nm, jur As String
Select Case Combo1.Text
Case Is = “11301012”
nm = “Maulani”
jur = “Teknikinformatika'”
Case Is = “11201012”
nm = “Anton”
jur = “manajemeninformatika”
Case Is = “11100012”
nm = “Bambang”
jur = “sisteminformasi'”
End Select
Text1.Text = nm
Text2.Text = jur
End Sub
Private Sub Command3_Click()
Unload Me
End SubPrivate Sub Command1_Click()Dim a, b, c, d As Integer
Dim e As Variant
Dim f As String
a = Val(Text3.Text)
b = Val(Text4.Text)
c = Val(Text5.Text)
d = Val(Text6.Text)
e = (a + b + c + d) / 4
Text7.Text = e
Text7.SetFocus
Select Case Text7.Text
Case Is > 80
f = “A”
Case Is > 70
f = “B”
Case Is > 60
f = “C”
Case Is > 50
f = “D”
Case Is < 50
f = “E”
End Select
Text8.Text = f
Command2.SetFocus
End Sub
Tinggalkan komentar