tugas vb

 

 

 

 

 

 

 

Private Sub aplikasipenghitungangaji_Click()

upenghitungangaji.Show

End Sub

Private Sub gaji2_Click()

ugaji2.Show

End Sub

Private Sub hurufmutu_Click()

uhurufmutu.Show

End Sub

Private Sub keluar_Click()

STMIKPringsewu = MsgBox(“apakah anda mau keluar dari progam ini?”, vbYesNo, “warning”)

If STMIKPringsewu = 6 Then

End

Else

file.Show

End If

End Sub

Private Sub penjualantiketkeretaapi_Click()

utiketkereta.Show

End Sub

Private Sub ptpulangpetang_Click()

uptpulangpetang.Show

End Sub

 

PRAKTIKUM 1

 

 

 

 

 

 

 

 

Private Sub Combo1_Click()

Dim GL As String

Dim GP, TJ, PJ, TT As Currency

GL = Combo1.Text

If GL = “I” Then

GP = 15000000

TJ = 150000

ElseIf GL = “II” Then

GP = 2000000

TJ = 200000

ElseIf GL = “III” Then

GP = 2500000

TJ = 250000

Else

GP = 3000000

TJ = 300000

End If

PJ = (GP + TJ) / 10

TT = GP + TJ – PJ

Text4.Text = GP

Text5.Text = TJ

Text6.Text = PJ

Text7.Text = TT

End Sub

Private Sub Command1_Click()

Text1.Text = “”

Text2.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

Text7.Text = “”

Combo1.Text = “”

Text1.SetFocus

End Sub

Private Sub Command2_Click()

Text1.Text = “”

Text2.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

Text7.Text = “”

Combo1.Text = “”

Text1.SetFocus

End Sub

Private Sub Command3_Click()

Unload Me

End Sub

Private Sub Form_Load()

Combo1.AddItem “I”

Combo1.AddItem “II”

Combo1.AddItem “III”

Combo1.AddItem “IV”

End Sub

 

PRAKTIKUM 2

 

 

 

 

 

 

Private Sub Command1_Click()

Dim GP, TJ, POT, GK, PJ, GD As Currency

GP = Val(Text1.Text)

TJ = Val(Text2.Text)

POT = Val(Text3.Text)

GK = GP + TJ – POT

PJ = (GK * 10) / 100

GD = GK – PJ

Text4.Text = GK

Text5.Text = PJ

Text6.Text = GD

End Sub

 

Private Sub Command2_Click()

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

Text1.SetFocus

 

End Sub

 

Private Sub Command3_Click()

Unload Me

End Sub

 

Pratikum 3

 

 

 

 

 

Private Sub Combo1_Click()

Dim NPM, NM, JR As String

NPM = Combo1.Text

If NPM = “11100012” Then

NM = “BINTANG ANDROMEDA”

JR = “SISTEM INFORMASI_S1”

ElseIf NPM = “11100076” Then

NM = “FITRA DWI MARTHIN”

JR = “SISTEM INFORMASI_S1”

ElseIf NPM = “11100010” Then

NM = “MAULANI”

JR = “SISTEM INFORMASI_S1”

End If

Text2.Text = NM

Text3.Text = JR

End Sub

 

 

Private Sub Command1_Click()

Dim NQ, NT, UTS, UAS, NA As Integer

Dim HM As String

NQ = Val(Text4.Text)

NT = Val(Text5.Text)

UTS = Val(Text6.Text)

UAS = Val(Text7.Text)

NA = (NQ + NT + UTS + UAS) / 4

If NA < 50 Then

HM = “E”

ElseIf NA < 60 Then

HM = “D”

ElseIf NA < 70 Then

HM = “C”

ElseIf NA < 80 Then

HM = “B”

Else

HM = “A”

End If

Text8.Text = NA

Text9.Text = HM

End Sub

 

Private Sub Command2_Click()

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

Text7.Text = “”

Text8.Text = “”

Text9.Text = “”

Combo1.Text = “”

Combo1.SetFocus

End Sub

 

Private Sub Command3_Click()

Unload Me

End Sub

 

Private Sub Form_Load()

Combo1.AddItem “11100010”

Combo1.AddItem “11100012”

Combo1.AddItem “11100016”

 

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

 

 

Private Sub Text6_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text7.SetFocus

End If

End Sub

 

 

 

Private Sub Text7_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Command1.SetFocus

End If

End Sub

 

PRAKTIKUM 4

 

 

 

 

 

 

 

 

 

Praktikum 5

 

 

 

 

 

 

Private Sub CMDPROSES_Click()

Dim s As String

s = Mid(txtnik.Text, 9, 1)

If s = “A” Then

txtgolongan.Text = “A”

txtjabatan.Text = “MANAGER”

txtgapok.Text = “3000000”

txttunjangan.Text = “875000”

 

ElseIf s = “B” Then

txtgolongan.Text = “B”

txtjabatan.Text = “KA SEKSI”

txtstatus.Text = “2500000”

txttunjangan.Text = “525000”

 

ElseIf s = “C” Then

txtgolongan.Text = “C”

txtjabatan.Text = “staff”

txtgapok.Text = “2000000”

txttunjangan.Text = “325000”

 

End If

 

s = Left(txtnik.Text, 3)

If s = “KEU” Then

txtjabatan.Text = “ACCOUNTING”

ElseIf s = “ADM” Then

txtbagian.Text = “ADMINISTRATION”

ElseIf s = “SDM” Then

txtbagian.Text = “GENERAL AFFAIR”

ElseIf s = “EDP” Then

txtbagian.Text = “IT UNIT”

ElseIf s = “SPM” Then

txtbagian.Text = “SECURITY”

End If

 

s = Right(txtnik.Text, 1)

If s = “S” Then

txtkodestatus.Text = “S”

txtstatus.Text = “SINGLE”

ElseIf s = “M” Then

txtkodestatus.Text = “M”

txtstatus.Text = “MENIKAH”

ElseIf s = “D” Then

txtkodestatus.Text = “D”

txtstatus.Text = “DUDA”

ElseIf s = “J” Then

txtkodestatus.Text = “J”

txtstatus.Text = “JANDA”

End If

 

s = Mid(txtnik.Text, 5, 4)

txttahun.Text = s

txttotalgaji.Text = Val(txtgapok.Text) + Val(txttunjangan.Text)

 

 

 

 

End Sub

 

Private Sub Command2_Click()

txtnama.Text = “”

txtnama.SetFocus

txtnik = “”

txtgolongan = “”

txtkodestatus = “”

txttahun = “”

txtjabatan = “”

txtbagian = “”

txtgapok = “”

txttunjangan = “”

txttotalgaji.Text = “”

txtstatus.Text = “”

End Sub

 

Private Sub Command3_Click()

txtnama.Text = “”

txtnama.SetFocus

txtnik = “”

txtgolongan = “”

txtkodestatus = “”

txttahun = “”

txtjabatan = “”

txtbagian = “”

txtgapok = “”

txttunjangan = “”

txttotalgaji.Text = “”

txtstatus = “”

End Sub

 

Private Sub Command4_Click()

End

End Sub

 

 

 

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s