tugas 4

 

PROGRAM 1: 

prog43

Private Sub Command1_Click()

Dim K, J, P, H, N As String

K = Mid(Combo1.Text, 3, 3)

If K = “SIM” Then

J = “SISTEM INFORMASI MANAJEMAN”

P = “YATI NUR OKTAFIA”

H = “75900”

ElseIf K = “EDP” Then

J = “ELEKTRONIK DATA PROCESSING”

P = “IMAM TARMIJI”

H = “62000”

ElseIf K = “MNJ” Then

J = “MANAJEMEN”

P = “VALENTINA MARIANA ADIWIATI”

H = “42000”

ElseIf K = “CDR” Then

J = ” COREL DRAW”

P = “RIYAN SUHANDI”

H = “53000”

ElseIf K = “RPL” Then

J = “REKAYASA PERANGKAT LUNAK”

P = “SINTA UMPU SINGA”

H = “83000”

End If

Text2.Text = J

Text3.Text = P

Text6.Text = H

K = Left(Combo1.Text, 1)

If K = “A” Then

N = “ANDI OFFSET YOGYAKARTA”

ElseIf K = “I” Then

N = “INDAH SURABAYA”

ElseIf K = “S” Then

N = “SALEMBA EMPAT”

ElseIf K = “E” Then

N = “ELEK MEDIA KOMPUTINDO”

ElseIf K = “M” Then

N = “MAXICOM”

End If

Text5.Text = N

Text4.Text = “20” & Right(Combo1.Text, 2)

End Sub

Private Sub Command2_Click()

Text2.SetFocus

Text2 = “”

Text3 = “”

Text4 = “”

Text5 = “”

Text6 = “”

End Sub

Private Sub Command3_Click()

Text2.SetFocus

Text2 = “”

Text3 = “”

Text4 = “”

Text5 = “”

Text6 = “”

End Sub

Private Sub Command4_Click()

Unload Me

End Sub

Private Sub Form_Load()

Combo1.AddItem “A-SIM-01”

Combo1.AddItem “I-EDP-02”

Combo1.AddItem “S-MNJ-03”

Combo1.AddItem “E-CDR-04”

Combo1.AddItem “M-RPL-05”

End Sub

 

 

 

 

 

PROGRAM 2:

prog41

Private Sub CBO_Click()

Dim NPM, NM, J As String

NPM = CBO.Text

If NPM = “12201183” Then

NM = “JONI PURNAMA”

J = “MANEJEMEN INFORMATIKA”

ElseIf NPM = “12201184” Then

NM = “BALE”

J = “MANAJEMEN INFORMATIKA”

ElseIf NPM = “12201185” Then

NM = “CALEHON”

J = “TEKNIK KOMPUTER”

End If

TXTNAMA.Text = NM

TXTJURUSAN.Text = J

TXTQUIS.SetFocus

End Sub

Private Sub CMDB_Click()

CBO.SetFocus

CBO.Text = “PILIH SALAH SATU”

TXTNAMA.Text = “”

TXTJURUSAN.Text = “”

TXTQUIS.Text = “”

TXTTUGAS.Text = “”

TXTUTS.Text = “”

TXTUAS.Text = “”

TXTNA.Text = “”

TXTHM.Text = “”

End Sub

Private Sub CMDK_Click()

Unload Me

End Sub

Private Sub CMDP_Click()

Dim NA, Q, T, UT, UA, HM As String

Q = Val(TXTQUIS.Text)

T = Val(TXTTUGAS.Text)

UT = Val(TXTUTS.Text)

UA = Val(TXTUAS.Text)

NA = (Q + T + UT + UA) / 4

TXTNA.Text = NA

If NA > 80 Then

HM = “A”

ElseIf NA > 70 Then

HM = “B”

ElseIf NA > 60 Then

HM = “C”

ElseIf NA > 50 Then

HM = “D”

ElseIf NA < 50 Then

HM = “E”

End If

TXTHM.Text = HM

End Sub

Private Sub Form_Load()

CBO.AddItem “12201183”

CBO.AddItem “12201184”

CBO.AddItem “12201185”

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

 

 

PROGRAM 3:

prog42

Private Sub CBO_Click()

Dim G, T, P, TL As Variant

Select Case CBO.Text

Case “I”

G = “1500000”

T = “150000”

Case “II”

G = “2000000”

T = “200000”

Case “III”

G = “2500000”

T = “250000”

Case “IV”

G = “3000000”

T = “300000”

Case Else

G = 0

T = 0

End Select

TL = Val(G) + Val(T)

P = TL * 0.1

TXTGAJI.Text = G

TXTTUNJANGAN.Text = T

TXTPAJAK.Text = P

TXTTOTAL.Text = TL – P

End Sub

Private Sub Command1_Click()

TXTNIDN.SetFocus

TXTNIDN.Text = “”

TXTNAMA.Text = “”

TXTGAJI.Text = “”

TXTTUNJANGAN.Text = “”

TXTPAJAK.Text = “”

TXTTOTAL.Text = “”

CBO.Text = “PILIH GOLONGAN”

End Sub

Private Sub Command2_Click()

TXTNIDN.SetFocus

TXTNIDN.Text = “”

TXTNAMA.Text = “”

TXTGAJI.Text = “”

TXTTUNJANGAN.Text = “”

TXTPAJAK.Text = “”

TXTTOTAL.Text = “”

CBO.Text = “PILIH GOLONGAN”

End Sub

Private Sub Command3_Click()

Unload Me

End Sub

Private Sub Form_Load()

CBO.AddItem “I”

CBO.AddItem “II”

CBO.AddItem “III”

CBO.AddItem “IV”

End Sub

Private Sub TXTNIDN_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

TXTNAMA.SetFocus

End If

End Sub

One thought on “tugas 4

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s