program vb tugas 4

3 Apr

siska 2.

 

Private Sub Combo1_Click()

Dim G, T, P, TT As Variant

Select Case Combo1.Text

Case “I”

G = 2500000

T = 250000

Case “II”

G = 2750000

T = 275000

 

Case “III”

G = 3000000

T = 300000

Case Else

G = 0

T = 0

End Select

TT = G + T

P = TT * 0.1

Text3.Text = G

Text4.Text = T

Text5.Text = P

Text6.Text = TT – P

End Sub

Private Sub Command1_Click()

Text1.SetFocus

Text1 = “”

Text2 = “”

Text3 = “”

Text4 = “”

Text5 = “”

Text6 = “”

Combo1 = “”

End Sub

 

Private Sub Command2_Click()

Text1.SetFocus

Text1 = “”

Text2 = “”

Text3 = “”

Text4 = “”

Combo1 = “”

Text5 = “”

Text6 = “”

End Sub

Private Sub Command3_Click()

Unload Me

End Sub

Private Sub Form_Load()

Combo1.AddItem “I”

Combo1.AddItem “II”

Combo1.AddItem “III”

End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text2.SetFocus

End If

End Sub

program vb tugas 4

3 Apr

siska 3

 

Private Sub Combo1_Click()

Dim N, J As String

Select Case Combo1.Text

Case “12201135″

N = “siska novita”

J = “Sistem Informasi”

Case “12100492″

N = “nova tri”

J = “Sistem Informasi”

Case “12100493″

N = “Fykha”

J = “Manajemen Informatika”

Case “12100494″

N = “Siska novita”

J = “Manajemen Informatika”

Case “12100495″

N = “fatma”

J = “Manajemaen Informatika”

Case “12201136″

N = “novitri”

J = “Manajemen Informatika”

Case “12100497″

N = “laila”

J = “Sistem Informasi”

Case “12201137″

N = “irawan”

J = “Sistem Informasi”

End Select

Text1.Text = N

Text2.Text = J

Text3.SetFocus

End Sub

 

Private Sub Command1_Click()

Text7.Text = Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text)

Text7.Text = Text7.Text / 4

If Text7.Text >= 90 Then

Text8.Text = “A”

ElseIf Text7.Text >= 80 Then

Text8.Text = “B”

ElseIf Text7.Text >= 70 Then

Text8.Text = “C”

ElseIf Text7.Text >= 60 Then

Text8.Text = “D”

ElseIf Text7.Text <= 50 Then

Text8.Text = “E”

End If

End Sub

 

Private Sub Command2_Click()

Text3.SetFocus

Text3 = “”

Text4 = “”

Text5 = “”

Text6 = “”

Text7 = “”

Text8 = “”

 

End Sub

 

Private Sub Command3_Click()

Unload Me

End Sub

 

Private Sub Form_Load()

Combo1.AddItem “12100491″

Combo1.AddItem “12100492″

Combo1.AddItem “12100493″

Combo1.AddItem “12100494″

Combo1.AddItem “12100495″

Combo1.AddItem “12100496″

Combo1.AddItem “12100497″

Combo1.AddItem “12100498″

End Sub

 

 

Private Sub Text3_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text4.SetFocus

End If

End Sub

 

 

Private Sub Text4_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text5.SetFocus

End If

End Sub

 

 

 

Private Sub Text5_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text6.SetFocus

End If

End Sub

program vb tugas 4

3 Apr

Gambar

Private Sub Combo1_Click()

Dim N, J As String

Select Case Combo1.Text

Case “12201135″

N = “siska novita”

J = “Sistem Informasi”

Case “12100492″

N = “nova tri”

 J = “Sistem Informasi”

Case “12100493″

N = “Fykha”

J = “Manajemen Informatika”

Case “12100494″

N = “Siska novita”

J = “Manajemen Informatika”

Case “12100495″

N = “fatma”

J = “Manajemaen Informatika”

Case “12201136″

N = “novitri”

J = “Manajemen Informatika”

Case “12100497″

N = “laila”

J = “Sistem Informasi”

Case “12201137″

N = “irawan”

J = “Sistem Informasi”

End Select

Text1.Text = N

Text2.Text = J

Text3.SetFocus

End Sub

 

Private Sub Command1_Click()

Text7.Text = Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text)

Text7.Text = Text7.Text / 4

If Text7.Text >= 90 Then

Text8.Text = “A”

ElseIf Text7.Text >= 80 Then

Text8.Text = “B”

ElseIf Text7.Text >= 70 Then

Text8.Text = “C”

ElseIf Text7.Text >= 60 Then

Text8.Text = “D”

ElseIf Text7.Text <= 50 Then

Text8.Text = “E”

End If

End Sub

 

Private Sub Command2_Click()

Text3.SetFocus

Text3 = “”

Text4 = “”

Text5 = “”

Text6 = “”

Text7 = “”

Text8 = “”

 

End Sub

 

Private Sub Command3_Click()

Unload Me

End Sub

 

Private Sub Form_Load()

Combo1.AddItem “12100491″

Combo1.AddItem “12100492″

Combo1.AddItem “12100493″

Combo1.AddItem “12100494″

Combo1.AddItem “12100495″

Combo1.AddItem “12100496″

Combo1.AddItem “12100497″

Combo1.AddItem “12100498″

End Sub

 

 

Private Sub Text3_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text4.SetFocus

End If

End Sub

 

 

Private Sub Text4_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text5.SetFocus

End If

End Sub

 

 

 

Private Sub Text5_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text6.SetFocus

End If

End Sub

 

program vb tugas 3

20 Mar

Gambar

PROSES ;

Private Sub Command1_Click()

Dim k, j, p As String

k = Mid(TXTNPM.Text, 3, 1)

If k = “1” Then

j = “SISTEM INFORMASI”

p = “STRATA SATU”

ElseIf k = “2” Then

j = “MANAJEMEN INFORMATIKA”

p = “DIPLOMA TIGA”

ElseIf k = “3” Then

j = “TEKNIK INFORMATIKA”

p = “DIPLOMA DUA”

ElseIf k = “4” Then

j = “KOMPUTER AKUNTASI”

p = “DIPLOMA EMPAT”

End If

TXTJURUSAN.Text = j

TXTPRODI.Text = p

TXTTM.Text = “20” & Left(TXTNPM.Text, 2)

TXTNU.Text = Right(TXTNPM.Text, 5)

End Sub

 

Private Sub Command2_Click()

Text1.SetFocus

Text1 = “”

TXTNPM = “”

TXTJURUSAN = “”

TXTPRODI = “”

TXTTM = “”

TXTNU = “”

End Sub

 

Private Sub Command3_Click()

Text1.SetFocus

Text1 = “”

TXTNPM = “”

TXTJURUSAN = “”

TXTPRODI = “”

TXTTM = “”

TXTNU = “”

End Sub

 

Private Sub Command4_Click()

Unload Me

End Sub

 

Private Sub Text1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

TXTNPM.SetFocus

End If

End Sub

program vb tugas 3

20 Mar

Gambar

ENTER ;

 

Private Sub Command2_Click()

Text1.SetFocus

Text1 = “”

TXTNPM = “”

TXTJURUSAN = “”

TXTPRODI = “”

TXTTM = “”

TXTNU = “”

End Sub

 

Private Sub Command3_Click()

Text1.SetFocus

Text1 = “”

TXTNPM = “”

TXTJURUSAN = “”

TXTPRODI = “”

TXTTM = “”

TXTNU = “”

End Sub

 

Private Sub Command4_Click()

Unload Me

End Sub

 

Private Sub Text1_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

Dim k, j, p As String

k = Mid(TXTNPM.Text, 3, 1)

If k = “1” Then

j = “SISTEM INFORMASI”

p = “STRATA SATU”

ElseIf k = “2” Then

j = “MANAJEMEN INFORMATIKA”

p = “DIPLOMA TIGA”

ElseIf k = “3” Then

j = “TEKNIK INFORMATIKA”

p = “DIPLOMA DUA”

ElseIf k = “4” Then

j = “KOMPUTER AKUNTASI”

p = “DIPLOMA EMPAT”

End If

TXTJURUSAN.Text = j

TXTPRODI.Text = p

TXTTM.Text = “20” & Left(TXTNPM.Text, 2)

TXTNU.Text = Right(TXTNPM.Text, 5)

End If

End Sub

 

 

 

program vb tugas 3

20 Mar

Gambar

PROGRAM 2 :

ENTER DAN PROSES

Private Sub Command1_Click()

Dim k, j, p As String

k = Mid(TXTNPM.Text, 3, 1)

If k = “1” Then

j = “SISTEM INFORMASI”

p = “STRATA SATU”

ElseIf k = “2” Then

j = “MANAJEMEN INFORMATIKA”

p = “DIPLOMA TIGA”

ElseIf k = “3” Then

j = “TEKNIK INFORMATIKA”

p = “DIPLOMA DUA”

ElseIf k = “4” Then

j = “KOMPUTER AKUNTASI”

p = “DIPLOMA EMPAT”

End If

TXTJURUSAN.Text = j

TXTPRODI.Text = p

TXTTM.Text = “20” & Left(TXTNPM.Text, 2)

TXTNU.Text = Right(TXTNPM.Text, 5)

End Sub

 

Private Sub Command2_Click()

Text1.SetFocus

Text1 = “”

TXTNPM = “”

TXTJURUSAN = “”

TXTPRODI = “”

TXTTM = “”

TXTNU = “”

End Sub

 

Private Sub Command3_Click()

Text1.SetFocus

Text1 = “”

TXTNPM = “”

TXTJURUSAN = “”

TXTPRODI = “”

TXTTM = “”

TXTNU = “”

End Sub

 

Private Sub Command4_Click()

Unload Me

End Sub

 

Private Sub Text1_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

Dim k, j, p As String

k = Mid(TXTNPM.Text, 3, 1)

If k = “1” Then

j = “SISTEM INFORMASI”

p = “STRATA SATU”

ElseIf k = “2” Then

j = “MANAJEMEN INFORMATIKA”

p = “DIPLOMA TIGA”

ElseIf k = “3” Then

j = “TEKNIK INFORMATIKA”

p = “DIPLOMA DUA”

ElseIf k = “4” Then

j = “KOMPUTER AKUNTASI”

p = “DIPLOMA EMPAT”

End If

TXTJURUSAN.Text = j

TXTPRODI.Text = p

TXTTM.Text = “20” & Left(TXTNPM.Text, 2)

TXTNU.Text = Right(TXTNPM.Text, 5)

End If

End Sub

 

 

program vb tigas 3

20 Mar

Gambar

PROSES ;

Private Sub Command1_Click()

Dim k, j, p As String

k = Mid(TXTNPM.Text, 3, 1)

If k = “1” Then

j = “SISTEM INFORMASI”

p = “STRATA SATU”

ElseIf k = “2” Then

j = “MANAJEMEN INFORMATIKA”

p = “DIPLOMA TIGA”

ElseIf k = “3” Then

j = “TEKNIK INFORMATIKA”

p = “DIPLOMA DUA”

ElseIf k = “4” Then

j = “KOMPUTER AKUNTASI”

p = “DIPLOMA EMPAT”

End If

TXTJURUSAN.Text = j

TXTPRODI.Text = p

TXTTM.Text = “20” & Left(TXTNPM.Text, 2)

TXTNU.Text = Right(TXTNPM.Text, 5)

End Sub

 

Private Sub Command2_Click()

Text1.SetFocus

Text1 = “”

TXTNPM = “”

TXTJURUSAN = “”

TXTPRODI = “”

TXTTM = “”

TXTNU = “”

End Sub

 

Private Sub Command3_Click()

Text1.SetFocus

Text1 = “”

TXTNPM = “”

TXTJURUSAN = “”

TXTPRODI = “”

TXTTM = “”

TXTNU = “”

End Sub

 

Private Sub Command4_Click()

Unload Me

End Sub

 

Private Sub Text1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

TXTNPM.SetFocus

End If

End Sub