TUGAS 5

yoga 1yoga 2yoga 3yoga 4yoga 5

 

Rumus 1.

Private Sub cmd_batal_Click()

txt_nama.SetFocus

txt_nama.Text = “”

txt_npm.Text = “”

txt_kelas.Text = “”

txt_jurusan.Text = “”

txt_program.Text = “”

txt_tahun.Text = “”

txt_urut.Text = “”

txt_pendaftaran.Text = “”

txt_pendidikan.Text = “”

txtbangunan.Text = “”

txt_almamater.Text = “”

txt_total.Text = “”

End Sub

 

Private Sub cmd_keluar_Click()

End

End Sub

 

 

Private Sub cmd_lagi_Click()

txt_nama.SetFocus

txt_nama.Text = “”

txt_npm.Text = “”

txt_kelas.Text = “”

txt_jurusan.Text = “”

txt_program.Text = “”

txt_tahun.Text = “”

txt_urut.Text = “”

txt_pendaftaran.Text = “”

txt_pendidikan.Text = “”

txtbangunan.Text = “”

txt_almamater.Text = “”

txt_total.Text = “”

End Sub

 

Private Sub cmd_proses_Click()

Dim x As String

x = Left(txt_npm.Text, 1)

If x = “E” Then

txt_kelas.Text = “Eksekutif”

txt_almamater.Text = “600000”

txtbangunan.Text = “1250000”

txt_almamater.Text = “600000”

ElseIf x = “R” Then

txt_kelas.Text = “Reguler”

txt_almamater.Text = “600000”

txtbangunan.Text = “1000000”

txt_almamater.Text = “600000”

End If

 

txt_tahun.Text = “20” & Mid(txt_npm.Text, 3, 2)

txt_urut.Text = Right(txt_npm.Text, 3)

 

x = Mid(txt_npm.Text, 5, 1)

If x = “1” Then

txt_jurusan.Text = “Sistem Informasi”

ElseIf x = “2” Then

txt_jurusan.Text = “Managemen Informatika”

ElseIf x = “3” Then

txt_jurusan.Text = “Managemen dan Komp. Akuntansi”

End If

x = Mid(txt_npm.Text, 6, 2)

If x = “01” Then

txt_program.Text = “Strata Satu”

txt_pendaftaran.Text = “200000”

ElseIf x = “02” Then

txt_program.Text = “Diploma Tiga”

txt_pendaftaran.Text = “150000”

ElseIf x = “03” Then

txt_program.Text = “Diploma Satu”

txt_pendaftaran.Text = “150000”

End If

x = Left(txt_npm.Text, 1) & Mid(txt_npm.Text, 6, 2)

If x = “E” & “01” Then

txt_pendidikan.Text = “1900000”

ElseIf x = “E” & “02” Then

txt_pendidikan.Text = “1650000”

ElseIf x = “E” & “03” Then

txt_pendidikan.Text = “1350000”

ElseIf x = “R” & “01” Then

txt_pendidikan.Text = “1500000”

ElseIf x = “R” & “02” Then

txt_pendidikan.Text = “1250000”

ElseIf x = “R” & “03” Then

txt_pendidikan.Text = “1250000”

End If

txt_total.Text = Val(txt_pendaftaran.Text) + Val(txt_pendidikan.Text) + Val(txtbangunan.Text) + Val(txt_almamater.Text)

 

End Sub

 

Private Sub Form_Load()

 

End Sub

 

Private Sub txt_almamater_keypress(keyascii As Integer)

If keyascii = 13 Then

txt_nama.SetFocus

txt_total.Text = Val(txt_pendaftaran.Text) + Val(txt_pendidikan.Text) + Val(txtbangunan.Text) + Val(txt_almamater.Text)

End If

End Sub

Rumus 2.

Private Sub Cmdbatal_Click()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

Txtjurusan.Text = “”

Txtpstudi.Text = “”

Txttahun.Text = “”

Txtnurut.Text = “”

Txtbp.Text = “”

Txtterbilang.Text = “”

End Sub

 

Private Sub Cmdkeluar_Click()

End

End Sub

 

Private Sub Cmdlagi_Click()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

Txtjurusan.Text = “”

Txtpstudi.Text = “”

Txttahun.Text = “”

Txtnurut.Text = “”

Txtbp.Text = “”

Txtterbilang.Text = “”

End Sub

 

Private Sub Cmdproses_Click()

Dim x As String

Txttahun.Text = “20” & Left(Txtnpm.Text, 2)

 

x = Mid(Txtnpm.Text, 3, 1)

If x = “1” Then

Txtjurusan.Text = “Sistem Informasi”

 

ElseIf x = “2” Then

Txtjurusan.Text = “Tehnik Informasi”

 

ElseIf x = “3” Then

Txtjurusan.Text = “Manajemen Informatika”

 

ElseIf x = “4” Then

Txtjurusan.Text = “Manajemen & Komp. Akuntansi”

 

End If

 

Txtnurut.Text = Right(Txtnpm.Text, 3)

 

x = Mid(Txtnpm.Text, 4, 2)

If x = “01” Then

Txtpstudi.Text = “Strata Satu”

Txtbp.Text = “1950000”

 

ElseIf x = “02” Then

Txtpstudi.Text = “Diploma Empat”

Txtbp.Text = “1750000”

 

ElseIf x = “03” Then

Txtpstudi.Text = “Diploma Tiga”

Txtbp.Text = “1650000”

 

ElseIf x = “04” Then

Txtpstudi.Text = “Diploma Dua”

Txtbp.Text = “1450000”

 

End If

Txtterbilang.Text = Terbilang(Txtbp.Text)

 

End Sub

 

Private Sub Form_Load()

 

End Sub

 

Private Sub Txtbp_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txtterbilang.Text = Terbilang(Txtbp.Text)

End If

End Sub

 

Function Terbilang(Angka As String) As String

Dim n1 As String

Dim nangka, Strjmlhuruf$, intpecahan As Integer, strpecahan$, urai$, Bil1$, strtot$, bil2$

Dim x, Y, z, i As Integer

 

For i = 1 To Len(Angka)

If Not Mid(Angka, i, 1) = “.” Then

nangka = nangka + Mid(Angka, i, 1)

End If

Next

 

If Len(LTrim(nangka)) = 0 Then

terbit = “Nol Rupiah”

Exit Function

End If

Strjmlhuruf = LTrim(RTrim((nangka)))

intpecahan = Val(Right(Mid(Angka, 15, 2), 2))

If (intpecahan = 0) Then

strpecahan = “”

End If

x = 0

Y = 0

urai = “”

 

While (x < Len(Strjmlhuruf))

x = x + 1

strtot = Mid(Strjmlhuruf, x, 1)

Y = Y + Val(strtot)

z = Len(Strjmlhuruf) – x + 1

 

Select Case Val(strtot)

Case 1

If (z = 1 Or z = 7 Or z = 10 Or z = 13) Then

Bil1 = “Satu ”

ElseIf (z = 4) Then

If (x = 1) Then

Bil1 = “Se”

Else

Bil1 = “Satu ”

End If

ElseIf (z = 2 Or z = 5 Or z = 8 Or z = 11 Or z = 14) Then

x = x + 1

strtot = Mid(Strjmlhuruf, x, 1)

z = Len(Strjmlhuruf) – x + 1

bil2 = “”

 

Select Case Val(strtot)

Case 0

Bil1 = “Sepuluh ”

Case 1

Bil1 = “Sebelas ”

Case 2

Bil1 = “Dua Belas ”

Case 3

Bil1 = “Tiga Belas ”

Case 4

Bil1 = “Empat Belas ”

Case 5

Bil1 = “Lima Belas ”

Case 6

Bil1 = “Enam Belas ”

Case 7

Bil1 = “Tujuh Belas ”

Case 8

Bil1 = “Delapan Belas ”

Case 9

Bil1 = “Sembilan Belas ”

End Select

Else

Bil1 = “Se”

End If

 

Case 2

Bil1 = “Dua ”

Case 3

Bil1 = “Tiga ”

Case 4

Bil1 = “Empat ”

Case 5

Bil1 = “Lima ”

Case 6

Bil1 = “Enam ”

Case 7

Bil1 = “Tujuh ”

Case 8

Bil1 = “Delapan ”

Case 9

Bil1 = “Sembilan ”

Case Else

Bil1 = “”

End Select

 

If (Val(strtot) > 0) Then

If (z = 2 Or z = 5 Or z = 8 Or z = 11 Or z = 14) Then

bil2 = “Puluh ”

ElseIf (z = 3 Or z = 6 Or z = 9 Or z = 12 Or z = 15) Then

bil2 = “Ratus ”

Else

bil2 = “”

End If

Else

bil2 = “”

End If

If (Y > 0) Then

Select Case z

Case 4

bil2 = bil2 + “Ribu ”

Y = 0

Case 7

bil2 = bil2 + “Juta ”

Y = 0

Case 10

bil2 = bil2 + “Milyar ”

Y = 0

Case 13

bil2 = bil2 + “Trilyun ”

Y = 0

End Select

End If

urai = urai + Bil1 + bil2

Wend

 

urai = urai + strpecahan

Terbilang = urai & “Rupiah ”

Terbilang = LCase(Terbilang)

n1 = UCase(Left(Terbilang, 1))

Terbilang = n1 & Mid(Terbilang, 2, Len(Terbilang) – 1)

End Function

Rumus 3.

 

Private Sub Form_Load()

Cbo_Kode.AddItem “Asus A43SA”

Cbo_Kode.AddItem “Asus A43SD”

Cbo_Kode.AddItem “Asus A43SJ”

Cbo_Kode.AddItem “Asus A43TA”

Cbo_Kode.AddItem “Asus N43SL”

Cbo_Kode.AddItem “Apple MD311”

Cbo_Kode.AddItem “Apple MD313”

Cbo_Kode.AddItem “Apple MD313”

Cbo_Kode.AddItem “Apple MD322”

Cbo_Kode.AddItem “Apple MC965”

End Sub

 

Private Sub Cbo_Kode_Click()

Dim Merk, Satuan As String

Select Case Cbo_Kode.Text

Case “Asus A43SA”

Merk = “Asus A43SA-VX090D”

Satuan = “5500000”

 

Case “Asus A43SD”

Merk = “Asus A43SD-VX052D”

Satuan = “4500000”

 

Case “Asus A43SJ”

Merk = “Asus A43SJ-VX792D”

Satuan = “4300000”

 

Case “Asus A43TA”

Merk = “Asus A43TA-VX034D”

Satuan = “4900000”

 

Case “Asus N43SL”

Merk = “Asus N43SL-VX264D”

Satuan = “4300000”

 

Case “Apple MD311”

Merk = “Apple MacBook Pro MD311”

Satuan = “19300000”

 

Case “Apple MD313”

Merk = “Apple MacBook Pro MD313”

Satuan = “24200000”

 

Case “Apple MD314”

Merk = “Apple MacBook Pro MD314”

Satuan = “11900000”

 

Case “Apple MD322”

Merk = “Apple MacBook Pro MD322”

Satuan = “14700000”

 

Case “Apple MC965”

Merk = “Apple MacBook Air MC965”

Satuan = “21300000”

End Select

 

Txt_Merk.Text = Merk

Txt_HS.Text = Satuan

Txt_JJ.SetFocus

End Sub

 

Private Sub Txt_JJ_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txt_HP.SetFocus

Txt_HP.Text = Val(Txt_HS.Text) * Val(Txt_JJ.Text)

End If

 

Select Case Txt_HP.Text

Case Is > 140000000

Txt_Dc.Text = Val(Txt_HP.Text) * 0.15

 

Case Is > 135000000

Txt_Dc.Text = Val(Txt_HP.Text) * 0.1

 

Case Is > 130000000

Txt_Dc.Text = Val(Txt_HP.Text) * 0.5

 

Case Is > 125000000

Txt_Dc.Text = Val(Txt_HP.Text) * 0.2

End Select

 

Txt_TB.Text = Val(Txt_HP.Text) – Val(Txt_Dc.Text)

End Sub

 

Private Sub Cmd_Proses_Click()

Txt_HP.Text = Val(Txt_HS.Text) * Val(Txt_JJ.Text)

Select Case Txt_HP.Text

Case Is > 140000000

Txt_Dc.Text = Val(Txt_HP.Text) * 0.15

 

Case Is > 135000000

Txt_Dc.Text = Val(Txt_HP.Text) * 0.1

 

Case Is > 130000000

Txt_Dc.Text = Val(Txt_HP.Text) * 0.5

 

Case Is > 125000000

Txt_Dc.Text = Val(Txt_HP.Text) * 0.2

End Select

 

Txt_TB.Text = Val(Txt_HP.Text) – Val(Txt_Dc.Text)

End Sub

 

 

Private Sub Cmd_Ulang_Click()

Cbo_Kode.SetFocus

Txt_Merk = “”

Txt_HS = “”

Txt_JJ = “”

Txt_HP = “”

Txt_Dc = “”

Txt_TB = “”

End Sub

 

Private Sub Cmd_Exit_Click()

End

End Sub

Rumus 4.

Private Sub Cmdkeluar_Click()

End

End Sub

 

 

 

Private Sub Cmdbatal_Click()

Txtkb.SetFocus

Txtkb.Text = “”

Txtjb.Text = “”

Txtp.Text = “”

Txttahun.Text = “”

Txtpenerbit.Text = “”

Txthg.Text = “”

End Sub

 

Private Sub Cmdproses_Click()

Dim s As String

Txttahun.Text = “20” & Mid(Txtkb.Text, 7, 2)

s = Mid(Txtkb.Text, 3, 3)

If s = “SIM” Then

Txtjb.Text = “Sistem Informasi Managemen”

Txtp.Text = “Andra Setiawan”

Txthg.Text = “75900”

ElseIf s = “EDP” Then

Txtjb.Text = “elektronik data Procesing”

Txtp.Text = “Desi Istiqomah”

Txthg.Text = “62000”

ElseIf s = “MNJ” Then

Txtjb.Text = “Manajemen”

Txtp.Text = “Sandy Fitrijaya”

Txthg.Text = “42000”

ElseIf s = “CDR” Then

Txtjb.Text = “Corel Draw”

Txtp.Text = “Tri Indah Sari”

Txthg.Text = “53000”

ElseIf s = “RPL” Then

Txtjb.Text = “Rekaya Perangkat Lunak ”

Txtp.Text = “Ernita Sari”

Txthg.Text = “83000”

 

 

End If

s = Mid(Txtkb.Text, 1, 1)

If s = “A” Then

Txtpenerbit.Text = “Andi offset yogyakarta”

 

ElseIf s = “I” Then

Txtpenerbit.Text = “Indah Surabaya”

ElseIf s = “S” Then

Txtpenerbit.Text = “Salemba Empat”

ElseIf s = “E” Then

Txtpenerbit.Text = “Elek Media Komputindo”

ElseIf s = “M” Then

Txtpenerbit.Text = “Maxicom”

End If

 

End Sub

 

 

Private Sub Cmdlg_Click()

Txtkb.SetFocus

Txtkb.Text = “”

Txtjb.Text = “”

Txtp.Text = “”

Txttahun.Text = “”

Txtpenerbit.Text = “”

Txthg.Text = “”

End Sub

 

Private Sub Label10_Click()

 

End Sub

Rumus 5.

Private Sub Cmd_Batal_Click()

Txt_Nama.SetFocus

Txt_NIK.Text = “”

Txt_Golongan.Text = “”

Txt_Kode.Text = “”

Txt_Status.Text = “”

Txt_Tahun.Text = “”

Txt_Jabatan.Text = “”

Txt_Bagian.Text = “”

Txt_Gaji.Text = “”

Txt_Tunjangan.Text = “”

Txt_Total.Text = “”

End Sub

 

Private Sub Cmd_Keluar_Click()

End

End Sub

 

Private Sub Cmd_Lagi_Click()

Txt_Nama.SetFocus

Txt_NIK.Text = “”

Txt_Golongan.Text = “”

Txt_Kode.Text = “”

Txt_Status.Text = “”

Txt_Tahun.Text = “”

Txt_Jabatan.Text = “”

Txt_Bagian.Text = “”

Txt_Gaji.Text = “”

Txt_Tunjangan.Text = “”

Txt_Total.Text = “”

End Sub

 

Private Sub Cmd_Proses_Click()

Dim x As String

Txt_Golongan.Text = Mid(Txt_NIK.Text, 5, 1)

Txt_Kode.Text = Mid(Txt_NIK.Text, 7, 1)

Txt_Tahun.Text = Left(Txt_NIK.Text, 4)

 

x = Mid(Txt_NIK.Text, 7, 1)

If x = “S” Then

Txt_Status.Text = “Single”

 

ElseIf x = “M” Then

Txt_Status.Text = “Menikah”

 

ElseIf x = “J” Then

Txt_Status.Text = “Janda”

 

ElseIf x = “D” Then

Txt_Status.Text = “Duda”

 

End If

 

x = Mid(Txt_NIK.Text, 5, 1)

If x = “A” Then

Txt_Jabatan.Text = “Manager”

Txt_Gaji.Text = “4000000”

Txt_Tunjangan.Text = “1025000”

 

ElseIf x = “B” Then

Txt_Jabatan.Text = “Ka. Seksi”

Txt_Gaji.Text = “3500000”

Txt_Tunjangan.Text = “975000”

 

ElseIf x = “C” Then

Txt_Jabatan.Text = “Staff”

Txt_Gaji.Text = “3000000”

Txt_Tunjangan.Text = “925000”

 

End If

 

x = Right(Txt_NIK.Text, 3)

If x = “KEU” Then

Txt_Bagian.Text = “Accounting”

 

ElseIf x = “ADM” Then

Txt_Bagian.Text = “Administrasi”

 

ElseIf x = “SDM” Then

Txt_Bagian.Text = “General Affair”

 

ElseIf x = “EDP” Then

Txt_Bagian.Text = “IT Unit”

 

ElseIf x = “SPM” Then

Txt_Bagian.Text = “Security”

End If

 

Txt_Total.Text = Val(Txt_Gaji.Text) + Val(Txt_Tunjangan.Text)

End Sub

 

Private Sub Form_Load()

 

End Sub

Iklan

TUGAS 4

Gambar 4Gambar 2Gambar 1

Rumus No.1

Private Sub Combo1_Click()

Dim nama, jurusan, hm As String

Select Case combo1npm.Text

Case “14100151”

nama = “darusman triyoga”

jurusan = “sistem informasi”

Case “14100071”

nama = “zeri andika”

jurusan = “sistem informasi”

End Sub

 

 

Private Sub Command1batal_Click()

combo1npm.setfokus

combo1npm.Text “”

textnama.Text = “”

textjurusan.Text = “”

textquis.Text = “”

textuas.Text = “”

textuts.Text = “”

textuas.Text = “”

textna.Text = “”

texthm.Text = “”

End Sub

 

Private Sub Command2kelur_Click()

Unload Me

End Sub

 

Private Sub Command3proses_Click()

Dim na As Integer

Dim hm As String

quis = Val(textquis.Text)

tugas = Val(texttugas.Text)

uts = Val(textuts.Text)

uas = Val(textuas.Text)

na = (quis + tugas + uts + uas) / 4

textna.Text = na

selectcase.textna.Text

Case Is > 80

hm = “a”

Case Is > 70

hm = “b”

Case Is > 60

hm = “c”

Case Is > 50

hm = “c”

Case Is > 50

hm = “d”

Case Is > 50

hm = “e”

End Select

texthm.Text = hm

End Sub

 

Rumus No.2

Private Sub chkbold_Click()

If chkbold.Value = 1 Then

lbltext.FontBold = True

Else

lbltext.FontBold = False

End If

End Sub

Private Sub Chkitalic_Click()

If chkitalic.Value = 1 Then

lbltext.FontItalic = True

Else

lbltext.FontItalic = False

End If

End Sub

 

Private Sub Chkstrike_Click()

If chkstrike.Value = 1 Then

lbltext.FontStrikethru = True

Else

lbltext.FontStrikethru = False

End If

End Sub

 

Private Sub Chkunder_Click()

If chkunder.Value = 1 Then

lbltext.FontUnderline = True

Else

lbltext.FontUnderline = False

End If

End Sub

 

Private Sub Cmdexit_Click()

End

End Sub

 

Private Sub optblue_Click()

lbltext.ForeColor = vbBlue

End Sub

 

Private Sub optgreen_Click()

lbltext.ForeColor = vbGreen

End Sub

 

Private Sub optred_Click()

lbltext.ForeColor = vbRed

End Sub

 

Private Sub optyellow_Click()

lbltext.ForeColor = vbYellow

End Sub

Gambar 3

Rumus No.3

Private Sub chkbold_Click()

label2.FontBold = chkbold.Value

End Sub

 

Private Sub chkitalic_Click()

label2.FontItalic = chkitalic.Value

End Sub

 

Private Sub chkstrike_Click()

label2.FontStrikethru = chkstrike.Value

End Sub

 

Private Sub chkunder_Click()

label2.FontUnderline = chkunder.Value

End Sub

 

Private Sub cmdkeluar_Click()

End

End Sub

 

Private Sub cmdok_Click()

label2.Caption = Text1.Text

End Sub

 

Private Sub optblue_Click()

label2.ForeColor = vbBlue

End Sub

 

Private Sub optgreen_Click()

label2.ForeColor = vbGreen

End Sub

 

Private Sub optred_Click()

label2.ForeColor = vbRed

End Sub

 

 

Private Sub optyellow_Click()

label2.ForeColor = vbYellow

End Sub

 

Rumus No.4

Private Sub Command3keluar_Click()

textkb.setfokus

textkb.Text = “”

textjb.Text = “”

textpg.Text = “”

texttt.Text = “”

textpn.Text = “”

texthg.Text = “”

End Sub

 

Private Sub Command4keluar_Click()

Unload Me

End Sub

 

Private Sub Command1proses_Click()

Dim kodebuku, judulbuku, pengarang, tahunterbut, penerbit, harga As String

Select Case textkdbuku.Text

Case “sim-09-a”

judul buku = “sisteminformasimanajemen”

pengarang = “fasiyaulfa”

tahun terbit = “2009”

penerbit = “andi offset yogyakarta”

harga = “72900”

Case “Edp-10-1”

judul buku = “elektronikadata prosesing”

pengarang = “nurulagustina”

tahun terbit = “2010”

penerbit = “indah surabaya”

harga = “62000”

Case “mnj-12-s”

judul buku = “manajemen”

pengarang = “rianhidayat”

tahun terbit = “2011”

penerbit = “selemba empat”

harga = “42000”

Case “Y-025-GA”

judul buku = “bahasa indonesia baik dan benar”

pengarang = “agung suntoro”

tahun terbit = “2006”

penerbit = “nagaswara bandung”

haga = “35000”

End Sub

 

 

 

 

tugas 3

g3g2g 1

Private Sub Command1_Click()

Text4.Text = Val(Text1) + Val(Text2) – Val(Text3)

Text5.Text = Val(Text4) * 0.1

Text6.Text = Val(Text4) – Val(Text5)

End Sub

 

Private Sub Command2_Click()

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

Text1.SetFocus

End Sub

 

Private Sub Command3_Click()

Unload Me

End Sub

 

Private Sub Text1_keypress(keyascii As Integer)

If keyascii = 13 Then

Text2.SetFocus

End If

End Sub

 

Private Sub Text2_keypress(keyascii As Integer)

If keyascii = 13 Then

Text3.SetFocus

End If

End Sub

 

Private Sub Text3_keypress(keyascii As Integer)

If keyascii = 13 Then

Text4.Text = Val(Text1) + Val(Text2) – Val(Text3)

Text5.Text = Val(Text4) * 0.1

Text6.Text = Val(Text4) – Val(Text5)

End If

End Sub

rumus 2

 

 

Private Sub chkbold_Click()

If chkbold.Value = 1 Then

lbltext.FontBold = True

Else

lbltext.FontBold = False

End If

 

End Sub

 

Private Sub Chkitalic_Click()

If chkitalic.Value = 1 Then

lbltext.FontItalic = True

Else

lbltext.FontItalic = False

End If

End Sub

 

Private Sub Chkstrike_Click()

If chkstrike.Value = 1 Then

lbltext.FontStrikethru = True

Else

lbltext.FontStrikethru = False

End If

End Sub

 

 

 

Private Sub Chkunder_Click()

If chkunder.Value = 1 Then

lbltext.FontUnderline = True

Else

lbltext.FontUnderline = False

End If

End Sub

 

Private Sub Cmdexit_Click()

End

End Sub

 

 

 

Private Sub optblue_Click()

lbltext.ForeColor = vbBlue

 

End Sub

 

Private Sub optgreen_Click()

lbltext.ForeColor = vbGreen

 

End Sub

 

Private Sub optred_Click()

lbltext.ForeColor = vbRed

 

End Sub

 

 

 

Private Sub optyellow_Click()

lbltext.ForeColor = vbYellow

End Sub

rumus 3

Private Sub chkbold_Click()

label2.FontBold = chkbold.Value

End Sub

 

Private Sub chkitalic_Click()

label2.FontItalic = chkitalic.Value

End Sub

 

Private Sub chkstrike_Click()

label2.FontStrikethru = chkstrike.Value

End Sub

 

Private Sub chkunder_Click()

label2.FontUnderline = chkunder.Value

End Sub

 

Private Sub cmdkeluar_Click()

End

End Sub

 

Private Sub cmdok_Click()

label2.Caption = Text1.Text

End Sub

 

Private Sub optblue_Click()

label2.ForeColor = vbBlue

End Sub

 

Private Sub optgreen_Click()

label2.ForeColor = vbGreen

End Sub

 

Private Sub optred_Click()

label2.ForeColor = vbRed

End Sub

 

Private Sub optyellow_Click()

label2.ForeColor = vbYellow

End Sub

 

tugas

4321

Private Sub Cmd_BL_Click()

Teeb_1.Tees = “”

Teeb_2.Tees = “”

Teeb_3.Tees = “”

Teeb_4t.Tees = “”

Teeb_5.Tees = “”

End Sub

 

Private Sub Cmd_km_Click()

End

End Sub

 

Private Sub Cmd_lg_Click()

Teeb_1.Tees = “”

Teeb_2.Tees = “”

Teeb_3.Tees = “”

Teeb_4.Tees = “”

Teeb_5.Tees = “”

End Sub

 

Private Sub Teeb_1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Teeb_2.Set Focus

End If

End Sub

Private Sub Teeb_2_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Teeb_3.Set Focus

End If

End Sub

Private Sub Teeb_3_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Teeb_4.Set Focus

End If

End Sub

Private Sub Teeb_4_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Teeb_5.Set Focus

End If

End Sub

Rumus no.2

Private Sub Cmd_km_Click(Index As Integer)

Teeb_dm.Tees = “”

Teeb_km.Tees = “”

Teeb_y.Tees = “”

End Sub

Private Sub Cmd_dm_Click(Index As Integer)

Dim y, dm, a As Single

y = Teeb_a

a = Teeb_dm

g = y * dm

Teeb_o.Tees = o

End Sub

Private Sub Teeb_y_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Dim y, a, g As Single

y = Teeb_y

a = Teeb_a

g = y * dm

Teeb_o.Tees o = o

End If

End Sub

Private Sub Teeb_g_KeyPress(KeyAscii As Integer)

End Sub

If KeyAscii = 13 Then

Teeb_y.SetFocus

End If

End Sub

 

Private Sub Teeb_y_Change()

 

End Sub

 

Private Sub Tees_a_Change()

 

End Sub

Rumus no.3

Private Sub Cmd_B_Click()

Txt_1.Text = “”

Txt_2.Text = “”

Txt_12.Text = “”

Txt_3.Text = “”

Txt_4.Text = “”

Txt_34.Text = “”

Txt_5.Text = “”

Txt_6.Text = “”

Txt_56.Text = “”

Txt_7.Text = “”

Txt_8.Text = “”

Txt_78.Text = “”

End Sub

Private Sub Cmd_H_Click()

Txt_12.Text = Val(Txt_1) + Val(Txt_2)

Txt_34.Text = Val(Txt_3) – Val(Txt_4)

Txt_56.Text = Val(Txt_5) * Val(Txt_6)

Txt_78.Text = Val(Txt_7) / Val(Txt_8)

End Sub

 

Private Sub Cmd_K_Click()

End

End Sub

 

Private Sub Cmd_L_Click()

Txt_1.Text = “”

Txt_2.Text = “”

Txt_12.Text = “”

Txt_3.Text = “”

Txt_4.Text = “”

Txt_34.Text = “”

Txt_5.Text = “”

Txt_6.Text = “”

Txt_56.Text = “”

Txt_7.Text = “”

Txt_8.Text = “”

Txt_78.Text = “”

End Sub

 

Private Sub Txt_1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txt_2.SetFocus

End If

End Sub

 

 

 

Private Sub Txt_2_KeyPress(KeyAscii As Integer)

Txt_12.Text = Val(Txt_1) + Val(Txt_2)

End Sub

 

Private Sub Txt_3_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txt_4.SetFocus

End If

End Sub

Private Sub Txt_5_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txt_6.SetFocus

End If

End Sub

 

Private Sub Txt_7_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txt_8.SetFocus

End If

End Sub

 

Private Sub Txt_4_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Dim C, D, CD As Single

C = Txt_3

D = Txt_4

CD = C – D

Txt_34.Text = CD

End If

End Sub

Private Sub Txt_6_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Dim E, F, EF As Single

E = Txt_5

F = Txt_6

EF = E * F

Txt_56.Text = EF

End If

End Sub

Private Sub Txt_8_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Dim G, H, GH As Single

G = Txt_7

H = Txt_8

GH = G – H

Txt_78.Text = GH

End If

End Sub

Rumus no.4

Private Sub Cmd_Hit_Click()

Dim R, J, K As Double

Txt_J.Text = Val(Txt_R.Text) * 0.1

Txt_K.Text = Val(Txt_R.Text) – Val(Txt_J.Text)

End Sub

 

Private Sub Cmd_Quit_Click()

End

End Sub

 

Private Sub Cmd_Ul_Click()

Txt_R.Text = “”

Txt_J.Text = “”

Txt_K.Text = “”

End Sub

 

Private Sub Txt_R_KeyPress(KeyAscii As Integer)

Dim R, J, K As Double

Txt_J.Text = Val(Txt_R.Text) * 0.1

Txt_K.Text = Val(Txt_R.Text) – Val(Txt_J.Text)

End Sub