C. PROGAM VISUAL BASIC

PROGAM 3

3

Private Sub Cmdbatal_Click()
Txtnama.SetFocus
Txtnama.Text = “”
Txtnpm.Text = “”
Txtjur.Text = “”
Txtprodi.Text = “”
Txttm.Text = “”
Txtnu.Text = “”

End Sub

Private Sub Cmdkeluar_Click()
End
End Sub

Private Sub Cmdlagi_Click()
Txtnama.SetFocus
Txtnama.Text = “”
Txtnpm.Text = “”
Txtjur.Text = “”
Txtprodi.Text = “”
Txttm.Text = “”
Txtnu.Text = “”

End Sub

Private Sub Cmdproses_Click()
Dim S As String
Txttm.Text = “20” & Left(Txtnpm.Text, 2)
S = Mid(Txtnpm.Text, 4, 2)
If S = “00” Then
Txtprodi.Text = “Strata Satu”
ElseIf S = “01” Then
Txtprodi.Text = “Diploma Tiga”
ElseIf S = “03” Then
Txtprodi.Text = “Diploma Dua”
End If
S = Mid(Txtnpm.Text, 3, 1)
If S = “1” Then
Txtjur.Text = “Sistem Informasi”
ElseIf S = “2” Then
Txtjur.Text = “Manajemen Informatika”
ElseIf S = “3” Then
Txtjur.Text = “Tehnik Informatika”
ElseIf S = “4” Then
Txtjur.Text = “Komputer Akuntansi”
End If

Txtnu.Text = Right(Txtnpm.Text, 3)
S = Txtnpm.Text
End Sub

Private Sub Form_Load()

End Sub

Private Sub txtnama_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
Txtjur.SetFocus
Dim S As String
Txttm.Text = “20” & Left(Txtnpm.Text, 2)
S = Mid(Txtnpm.Text, 3, 1)
If S = “1” Then
Txtjur.Text = “Sistem Informasi”
ElseIf S = “2” Then
Txtjur.Text = “Manajemen Informatika”
ElseIf S = “3” Then
Txtjur.Text = “Tehnik Informatika”
ElseIf S = “4” Then
Txtjur.Text = “Komputer Akuntansi”
End If
S = Mid(Txtnpm.Text, 4, 2)
If S = “01” Then
Txtprodi.Text = “Strata Satu”
ElseIf S = “02” Then
Txtprodi.Text = “Diploma Tiga”
ElseIf S = “03” Then
Txtprodi.Text = “Diploma Empat”
ElseIf S = “04” Then
Txtprodi.Text = “Diploma Dua”
End If
Txtnu.Text = Right(Txtnpm.Text, 3)
End If
End Sub

Iklan
Dipublikasi di Tak Berkategori | Meninggalkan komentar

PROGAM VISUAL BASIC ENTRI PENJUALAN KOMPUTER

B. PROGAM 2

2

Private Sub cbokode_Click()
Dim jk, hs, HB As Integer
Select Case cbokode.Text
Case “P205”
jk = “Pentium II 500 Mega Hz”
hs = “1500000”
Case “P308”
jk = “Pentium III 800 Mega Hz”
hs = “2100000”
Case “P310”
jk = “Pentium III 1.0 Giga Hz”
hs = “3500000”
Case “P415”
jk = “Pentium IV 1.5 Giga Hz”
hs = “4000000”
Case “P417”
jk = “Pentium IV 1.7 Giga Hz”
hs = “4200000”
Case “P419”
jk = “Pentium IV 1.9 Giga Hz”
hs = “5500000”
End Select
txtjenis.Text = jk
txtharga.Text = hs
txtjumlah.SetFocus
End Sub

Private Sub cmdkeluar_Click()
End
End Sub

Private Sub cmdlagi_Click()
cbokode.SetFocus
cbokode.Text = “”
txtjenis.Text = “”
txtharga.Text = “”
txtjumlah.Text = “”
txtharpen.Text = “”
txtdiskon.Text = “”
txtbayar.Text = “”
End Sub

Private Sub cmdproses_Click()
txtharpen.Text = Val(txtharga) * Val(txtjumlah)
Select Case txtharpen.Text
Case Is > 30000000
txtdiskon.Text = Val(txtharpen) * 0.15
Case Is > 25000000
txtdiskon.Text = Val(txtharpen) * 0.1
Case Is > 20000000
txtdiskon.Text = Val(txtharpen) * 0.05
Case Is > 15000000
txtdiskon.Text = Val(txtharpen) * 0.02
End Select
txtbayar.Text = Val(txtharpen) – Val(txtdiskon)
End Sub

Private Sub Form_Load()
cbokode.AddItem “P205”
cbokode.AddItem “P308”
cbokode.AddItem “P310”
cbokode.AddItem “P415”
cbokode.AddItem “P417”
cbokode.AddItem “P419”

End Sub

Dipublikasi di Tak Berkategori | Meninggalkan komentar

PROGAM VISUAL BASIC 4

A. PROGAM 1

1

Private Sub cboKode_Click()
Dim mt, hs, TB As Integer
Select Case cbokode.Text
Case “Apple MC965 MacBook Air”
mt = “Apple MacBook Air MC965”
hs = “12800000”
Case “Apple MC966 MacBook Air”
mt = “Apple MacBook Air MC966”
hs = “15800000”
Case “Apple MC968 MacBook Air”
mt = “Apple MacBook Air MC968”
hs = “9900000”
Case “Apple MC969 MacBook Air”
mt = “Apple MacBook Air MC969”
hs = “11900000”
Case “Apple MC700 MacBook Pro”
mt = “Apple MacBook Pro MC700”
hs = “10800000”
Case “Apple MC721 MacBook Pro”
mt = “Apple MacBook Pro MC721”
hs = “15900000”
Case “Apple MC723 MacBook Pro”
mt = “Apple MacBook Pro MC723”
hs = “19300000”
Case “Apple MC724 MacBook Pro”
mt = “Apple MacBook Pro MC724”
hs = “13700000”
Case “Apple MC311 MacBook Pro”
mt = “Apple MacBook Pro MC311”
hs = “24200000”
Case “Apple MC313 MacBook Pro”
mt = “Apple MacBook Pro MC313”
hs = “11900000”
Case “Apple MC314 MacBook Pro”
mt = “Apple MacBook Pro MC314”
hs = “14700000”
Case “Apple MC318 MacBook Pro”
mt = “Apple MacBook Pro MC318”
hs = “17600000”
Case “Apple MC322 MacBook Pro”
mt = “Apple MacBook Pro MC322”
hs = “21300000”
Case “Apple MC965 MacBook Air”
mt = “Apple MacBook Air MC965”
hs = “12800000”
Case “Apple MC966 MacBook Air”
mt = “Apple MacBook Air MC966”
hs = “15800000”
End Select
txtmerk.Text = mt
txtharga.Text = hs
txtjumlah.SetFocus
End Sub

Private Sub cmdkeluar_Click()
End
End Sub

Private Sub cmdlagi_Click()
cbokode.SetFocus
cbokode.Text = “”
txtmerk.Text = “”
txtharga.Text = “”
txtjumlah.Text = “”
txtharpen.Text = “”
txtdiskon.Text = “”
txttotal.Text = “”
End Sub

Private Sub cmdproses_Click()
txtharpen.Text = Val(txtharga) * Val(txtjumlah)
Select Case txtharpen.Text
Case Is > 140000000
txtdiskon.Text = Val(txtharpen) * 0.15
Case Is > 135000000
txtdiskon.Text = Val(txtharpen) * 0.1
Case Is > 130000000
txtdiskon.Text = Val(txtharpen) * 0.05
Case Is > 125000000
txtdiskon.Text = Val(txtharpen) * 0.02
End Select
txttotal.Text = Val(txtharpen) – Val(txtdiskon)
End Sub

Private Sub Form_Load()
cbokode.AddItem “Apple MC965 MacBook Air”
cbokode.AddItem “Apple MC966 MacBook Air”
cbokode.AddItem “Apple MC968 MacBook Air”
cbokode.AddItem “Apple MC969 MacBook Air”
cbokode.AddItem “Apple MC700 MacBook Pro”
cbokode.AddItem “Apple MC721 MacBook Pro”
cbokode.AddItem “Apple MC723 MacBook Pro”
cbokode.AddItem “Apple MC724 MacBook Pro”
cbokode.AddItem “Apple MC311 MacBook Pro”
cbokode.AddItem “Apple MC313 MacBook Pro”
cbokode.AddItem “Apple MC314 MacBook Pro”
cbokode.AddItem “Apple MC318 MacBook Pro”
cbokode.AddItem “Apple MC322 MacBook Pro”
cbokode.AddItem “Apple MC965 MacBook Air”
cbokode.AddItem “Apple MC966 MacBook Air”
End Sub

Dipublikasi di Tak Berkategori | Meninggalkan komentar

D. PROGAM 4

A. progam 4

4

 

Private Sub Cbogolongan_Click()

Dim gapok, tunjangan, pajak, total As Variant

Select Case Cbogolongan.Text

Case “I”

gapok = 5000000

tunjangan = 500000

Case “II”

gapok = 5000000

tunjangan = 5000000

Case “III”

gapok = 7000000

tunjangan = 700000

Case “IV”

gapok = 8000000

tunjangan = 800000

Case Else

gapok = 0

tunjangan = O

End Select

 

total = gapok + tunjangan

pajak = total * 0.1

Txtgapok.Text = gapok

Txttunjangan.Text = tunjangan

Txtpajak.Text = pajak

Txttotal.Text = total – pajak

End Sub

 

 

Private Sub Cmdbatal_Click(Index As Integer)

Txtnidn.SetFocus

Txtnidn.Text = “”

Txtnama.Text = “”

Cbogolongan.Text = “”

Txtgapok.Text = “”

Txttunjangan.Text = “”

Txtpajak.Text = “”

Txttotal.Text = “”

End Sub

 

Private Sub Cmdkeluar_Click()

End

End Sub

 

Private Sub Cmdlagi_Click(Index As Integer)

Txtnidn.SetFocus

Txtnidn.Text = “”

Txtnama.Text = “”

Cbogolongan.Text = “”

Txtgapok.Text = “”

Txttunjangan.Text = “”

Txtpajak.Text = “”

Txttotal.Text = “”

End Sub

 

Private Sub Form_Load()

Cbogolongan.AddItem “I”

Cbogolongan.AddItem “II”

Cbogolongan.AddItem “III”

Cbogolongan.AddItem “IV”

 

End Sub

Dipublikasi di Tak Berkategori | Meninggalkan komentar

C. PROGAM 3

A. progam 3

Capture

Private Sub Cbonpm_Click()

Dim nama, jurusan, HM As String

Select Case Cbonpm.Text

Case “14100571”

nama = “YAZID BAROKATULLOH”

jurusan = “Sistem Informasi”

Case “14100257”

nama = “DWI KURNIAWAN”

jurusan = “Sistem Informasi”

Case “14100419”

nama = “IQBAL DEKA YANDO”

jurusan = “Sistem Informasi”

Case “14100212”

nama = “WHISMA JUDIN”

jurusan = “Sistem Informasi”

Case “14100216”

nama = “YODA RIZKITIAN”

jurusan = “Sistem Informasi”

Case “14100427”

nama = “RANA ANHARI”

jurusan = “Sistem Informasi”

Case “14100425”

nama = “NIKKO HENDI PRATAMA”

jurusan = “Sistem Informasi”

Case “14100418”

nama = “ABDUL AZIS”

jurusan = “Sistem Informasi”

Case “14100420”

nama = “JIMMI BENARDO SINAGA”

jurusan = “Sistem Informasi”

Case “14100251”

nama = “SHOLIHIN”

jurusan = “Sistem Informasi”

End Select

Txtnama.Text = nama

Txtjurusan.Text = jurusan

Txtquis.SetFocus

End Sub

Private Sub cmdbatal_Click()

Cbonpm.SetFocus

Cbonpm.Text = “”

Txtnama.Text = “”

Txtjurusan.Text = “”

Txtquis = “”

Txttugas = “‘”

Txtuts = “”

Txtuas = “”

Txtna = “”

Txthm = “”

End Sub

Private Sub cmdkeluar_Click()

Unload Me

End Sub

 

Private Sub cmdproses_Click()

Dim NA As Integer

Dim HM As String

QUIS = Val(Txtquis.Text)

TUGAS = Val(Txttugas.Text)

UTS = Val(Txtuts.Text)

UAS = (Txtuas.Text)

NA = (QUIS + TUGAS + UTS + UAS) / 4

Txtna = NA

Select Case Txtna.Text

Case Is > 80

HM = “A”

Case Is > 70

HM = “B”

Case Is > 60

HM = “C”

Case Is > 50

HM = “D”

Case Is < 50

HM = “E”

End Select

Txthm.Text = HM

End Sub

Private Sub Form_Load()

Cbonpm.AddItem “14100571”

Cbonpm.AddItem “14100257”

Cbonpm.AddItem “14100419”

Cbonpm.AddItem “14100212”

Cbonpm.AddItem “14100216”

Cbonpm.AddItem “14100427”

Cbonpm.AddItem “14100425”

Cbonpm.AddItem “14100418”

Cbonpm.AddItem “14100457”

Cbonpm.AddItem “14100251”

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 Txtuas_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Dim NA As Integer

Dim HM As String

QUIS = Val(Txtquis.Text)

TUGAS = Val(Txttugas.Text)

UTS = Val(Txtuts.Text)

UAS = (Txtuas.Text)

NA = (QUIS + TUGAS + UTS + UAS) / 4

Txtna = NA

Select Case Txtna.Text

Case Is > 80

HM = “A”

Case Is > 70

HM = “B”

Case Is > 60

HM = “C”

Case Is > 50

HM = “D”

Case Is < 50

HM = “E”

End Select

Txthm.Text = HM

End If

End Sub

Private Sub Txtuts_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txtuas.SetFocus

End If

End Sub

Dipublikasi di Tak Berkategori | Meninggalkan komentar

B. PROGAM 2

A. progam 2

44

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 Command1_Click()

Label2.Caption = Text1.Text

End Sub

 

Private Sub Command2_Click()

End

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

Dipublikasi di Tak Berkategori | Meninggalkan komentar

PROGAM 1

A. progam 1

1

 

Private Sub Check1_Click()

If Check1.Value = 1 Then

Label1.FontBold = True

Else

Label1.FontBold = False

End If

End Sub

 

Private Sub Check2_Click()

If Check2.Value = 1 Then

Label1.FontItalic = True

Else

Label1.FontItalic = False

End If

End Sub

 

Private Sub Check3_Click()

If Check3.Value = 1 Then

Label1.FontUnderline = True

Else

Label1.FontUnderline = False

End If

End Sub

 

Private Sub Check4_Click()

If Check4.Value = 1 Then

Label1.FontStrikethru = True

Else

Label1.FontStrikethru = False

End If

End Sub

 

Private Sub Command1_Click()

End

End Sub

 

Private Sub Option1_Click()

Label1.ForeColor = vbRed

End Sub

 

Private Sub Option2_Click()

Label1.ForeColor = vbGreen

End Sub

 

Private Sub Option3_Click()

Label1.ForeColor = vbBlue

End Sub

 

Private Sub Option4_Click()

Label1.ForeColor = vbYellow

End Sub

Dipublikasi di Tak Berkategori | Meninggalkan komentar