penjualan laptop apple

penjualan apple

 

Private Sub cbokode_Click()
txtjj.SetFocus
End Sub

Private Sub cmdproses_Click()
Dim penjualan, discount, kode, merk, bayar, a, b As String
Dim harga As Variant

kode = Mid(cbokode.Text, 7, 5)
If kode = “MC965″ Then
merk = “Apple MacBook Air MC965″
harga = “12800000″
ElseIf kode = “MC966″ Then
merk = “Apple MacBook Air MC966″
harga = “15800000″
ElseIf kode = “MC968″ Then
merk = “Apple MacBook Air MC968″
harga = “9900000″
ElseIf kode = “MC969″ Then
merk = “Apple MacBook Air MC969″
harga = “11900000″
ElseIf kode = “MC700″ Then
merk = “Apple MacBook Air MC700″
harga = “10800000″
ElseIf kode = “MC721″ Then
merk = “Apple MacBook Air MC721″
harga = “15900000″
ElseIf kode = “MC723″ Then
merk = “Apple MacBook Air MC723″
harga = “19300000″
ElseIf kode = “MC724″ Then
merk = “Apple MacBook Air MC724″
harga = “13700000″
ElseIf kode = “MC311″ Then
merk = “Apple MacBook Air MC311″
harga = “24200000″
ElseIf kode = “MC313″ Then
merk = “Apple MacBook Air MC313″
harga = “11900000″
ElseIf kode = “MC314″ Then
merk = “Apple MacBook Air MC314″
harga = “14700000″
ElseIf kode = “MC318″ Then
merk = “Apple MacBook Air MC318″
harga = “17600000″
ElseIf kode = “MC322″ Then
merk = “Apple MacBook Air MC322″
harga = “21300000″
ElseIf kode = “MC965″ Then
merk = “Apple MacBook Air MC965″
harga = “12800000″
ElseIf kode = “MC966″ Then
merk = “Apple MacBook Air MC966″
harga = “15800000″
End If
txtmerk.Text = merk
txths.Text = harga

a = Val(txtjj.Text)
b = Val(txths.Text)
penjualan = a * b
txthp.Text = penjualan

Select Case txthp.Text
Case Is > 140000000
discount = 0.15 * penjualan
Case Is > 135000000
discount = 0.1 * penjualan
Case Is > 130000000
discount = 0.05 * penjualan
Case Is > 125000000
discount = 0.02 * penjualan
End Select
penjualan = Val(txthp.Text)
txtdis.Text = discount

txttb.Text = Val(txthp.Text) – Val(txtdis.Text)

End Sub

Private Sub cmdlagi_Click()
cbokode.SetFocus
cbokode.Text = “”
txtmerk.Text = “”
txths.Text = “”
txtjj.Text = “”
txtdis.Text = “”
txttb.Text = “”
txthp.Text = “”

End Sub

Private Sub cmdkeluar_Click()
End
End Sub

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

 

PT. PULANG PETANG SETIAP HARI

PT

PT. PULANG PETANG SETIAP HARI

Private Sub cmdbatal_Click()

txtgolongan.SetFocus

txtgolongan.Text = “”

txtkode.Text = “”

txtstatus.Text = “”

txttahun.Text = “”

txtjabatan.Text = “”

txtbagian.Text = “”

txtgaji.Text = “”

txttunjangan.Text = “”

txttotal.Text = “”

txtterbilang = “”

txtnama.Text = “”

txtnik.Text = “”

End Sub

 

Private Sub cmdkeluar_Click()

Unload Me

End Sub

 

Private Sub cmdlagi_Click()

txtgolongan.SetFocus

txtgolongan.Text = “”

txtkode.Text = “”

txtstatus.Text = “”

txttahun.Text = “”

txtjabatan.Text = “”

txtbagian.Text = “”

txtgaji.Text = “”

txttunjangan.Text = “”

txttotal.Text = “”

txtterbilang = “”

txtnama.Text = “”

txtnik.Text = “”

End Sub

 

Private Sub cmdproses_Click()

Dim Y As String

txttahun = Left(txtnik.Text, 4)

Y = Mid(txtnik.Text, 5, 1)

If Y = “A” Then

txtgolongan.Text = “A”

txtjabatan.Text = “Manager”

txtgaji.Text = “4000000”

txttunjangan.Text = “1025000”

ElseIf Y = “B” Then

txtgolongan.Text = “B”

txtjabatan.Text = “Ka.Seksi”

txtgaji.Text = “3500000”

txttunjangan.Text = “975000”

ElseIf Y = “C” Then

txtgolongan.Text = “C”

txtjabatan.Text = “Staff”

txtgaji.Text = “3000000”

txttunjangan = “925000”

End If

Y = Mid(txtnik.Text, 7, 1)

If Y = “S” Then

txtkode.Text = “S”

txtstatus.Text = “Single”

ElseIf Y = “M” Then

txtkode.Text = “M”

txtstatus.Text = “Menikah”

ElseIf Y = “J” Then

txtkode.Text = “J”

txtstatus.Text = “Janda”

ElseIf Y = “D” Then

txtkode.Text = “D”

txtstatus.Text = “Duda”

End If

Y = Right(txtnik.Text, 3)

If Y = “KEU” Then

txtbagian.Text = “Accounting”

ElseIf Y = “ADM” Then

txtbagian.Text = “Administrasi”

ElseIf Y = “SDM” Then

txtbagian.Text = “General Affair”

ElseIf Y = “EDP” Then

txtbagian.Text = “IT Unit”

ElseIf Y = “SPM” Then

txtbagian.Text = “Security”

End If

txttotal.Text = Val(txtgaji.Text) + Val(txttunjangan.Text)

End Sub

 

Private Sub Form_Load()

txtgolongan.Text = “”

txtkode.Text = “”

txtstatus.Text = “”

txttahun.Text = “”

txtjabatan.Text = “”

txtbagian.Text = “”

txtgaji.Text = “”

txttunjangan.Text = “”

txttotal.Text = “”

txtterbilang = “”

txtnama.Text = “”

txtnik.Text = “”

End Sub

Tugas 4

hc

Private Sub cmdproses_Click()

kodetiket = Left(txtkt.Text, 3)

If kodetiket = “bim” Then
jeniskereta = “bima”
hatgatiket = “50000”
jamberangkat = “16.00”
ElseIf kodetiket = “eko” Then
jeniskereta = “ekonomi”
hargatiket = “35000”
jamberangkat = “19.00”
ElseIf kodetiket = “mut” Then
jeniskereta = “mutiara”
hargatiket = “23000”
jamberangkat = “17.00”
ElseIf kodetiket = “sen” Then
jeniskereta = “senja”
hargatiket = “15000”
jamberangkat = “20000”

End If
txtkt.Text = kodetiket
txtjk.Text = jeniskereta
txtht.Text = hargatiket
txtjb.Text = jamberangkat

txtjt.SetFocus

End Sub

Private Sub Form_Activate()
txtkt.SetFocus
End Sub

Private Sub txtjt_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txttotalp.Text = Val(txtht.Text) * Val(txtjt.Text)
End If
End Sub

 

PERHITUNGAN HARGA SETELAH DISKON

vb 2

PERHITUNGAN HARGA SETELAH DISKON

Private Sub Command1_Click()

Text2.Text = Val(Text1.Text) * 0.1

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

End Sub

 

 

Private Sub Command2_Click()

Text1 = “”

Text2 = “”

Text3 = “”

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

PERKALIAN DUA BILANGAN

vb 1

VB 1

Private Sub Command1_Click()

Text3.Text = Val(Text1.Text) * Val(Text2.Text)

End Sub

 

Private Sub Command2_Click()

Text1.SetFocus

Text1 = “”

Text2 = “”

Text3 = “”

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

 

KALKULATOR

KALKULATOR

CALCULATOR

 

Private Sub Command1_Click()

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

End Sub

 

Private Sub Command2_Click()

Text3.Text = Val(Text1.Text) * Val(Text2.Text)

End Sub

 

Private Sub Command3_Click()

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

End Sub

 

Private Sub Command4_Click()

Text3.Text = Val(Text1.Text) / Val(Text2.Text)

End Sub

 

Private Sub Command5_Click()

Unload Me

End Sub

 

Private Sub Text1_keypress(keyascii As Integer)

If keyascii = 13 Then

Text2.SetFocus

End If

End Sub

 

 

 

 

HURUF MUTU

huruf mutu

HURUF MUTU STMIK PRINGSEWU

Private Sub Combo1_Change()

Dim nama, jurusan, HM As String

Select Case Combo1.Text

Case “12100030”

nama = “FURUSIM MARFUAH”

jurusan = “Sistem Informasi”

Case “1210005”

nama = “VIA WIDAYU”

jurusan = “Manajemen Informatika”

Case “12100011”

nama = “MARISKA”

jurusan = “Tehnik Informtika”

End Select

Text1.Text = nama

Text2.Text = jurusan

Text3.SetFocus

End Sub

 

Private Sub Command1_Click()

Dim NA As Integer

Dim HM As String

QUIS = Val(Text3.Text)

TUGAS = Val(Text4.Text)

UTS = Val(Text5.Text)

UAS = Val(Text6.Text)

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

Text7.Text = NA

Select Case Text7.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

Text8.Text = HM

End Sub

 

Private Sub Command2_Click()

Combo1.SetFocus

Combo1.Text = “”

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

Text7.Text = “”

Text8.Text = “”

End Sub

 

Private Sub Command3_Click()

Unload Me

End Sub

 

Private Sub Form_Load()

Combo1.AddItem “12100030”

Combo1.AddItem “12021005”

Combo1.AddItem “12100011”

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

M. VB

font

MICROSOFT   VISUAL  BASIC 

Private Sub chkBold_Click()

‘membuat teks tebal

If chkBold.Value = 1 Then

lblTeks.FontBold = True

Else

lblTeks.FontBold = False

End If

End Sub

 

Private Sub chkItalic_Click()

‘membuat teks miring

If chkItalic.Value = 1 Then

lblTeks.FontItalic = True

Else

lblTeks.FontItalic = False

End If

End Sub

 

Private Sub chkStrike_Click()

‘membuat garis tengah

If chkStrike.Value = 1 Then

lblTeks.fontstrike = True

Else

lblTeks.fontstrike = False

End If

End Sub

 

Private Sub chkUnder_Click()

‘membuat garis bawah

If chkUnder.Value = 1 Then

lblTeks.fontunder = True

Else

lblTeks.fontunder = False

End If

End Sub

 

Private Sub cmdExit_Click()

Unload Me

End Sub

 

Private Sub optBlue_Click()

‘membuat teks berwarna biru

lblTeks.forocolor = vbBlue

End Sub

 

Private Sub optGreen_Click()

‘membuat teks berwarna hijau

lblTeks.ForeColor = vbGreen

End Sub

 

Private Sub optRed_Click()

‘membuat teks berwarna merah

lblTeks.ForeColor = vbRed

End Sub

 

Private Sub optYellow_Click()

‘membuat teks berwarna kuning

lblTeks.ForeColor = vbYellow

End Sub

APLIKASI PERHITUNGAN GAJI

aplikasi perhitungan gaji

APLIKASI PERHITUNGAN GAJI

 

Private Sub Command1_Click()

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

Text5.Text = Val(Text4.Text) * 0.1

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

End Sub

 

Private Sub Command2_Click()

Text1.SetFocus

Text1 = “”

Text2 = “”

Text3 = “”

Text4 = “”

Text5 = “”

Text6 = “”

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

 

tugas visual basic

TUGAS VISUAL BASIC 2

 

Gambar

1. NPM :

Private Sub txtnpm_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnama.SetFocus
End If
End Sub

2. Nama Mahasiswa:
Private Sub txtnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtps.SetFocus
End If
End Sub

3. Program Studi :
Private Sub txtps_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtjurusan.SetFocus
End If
End Sub

4. Jurusan :
Private Sub txtjurusan_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtsemester.SetFocus
End If
End Sub

5. Semester :
Private Sub txtsemester_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
End If
End Sub

6. Lagi :
Private Sub cmdlagi_Click()
txtnpm.SetFocus
txtnpm = “”
txtnama = “”
txtps = “”
txtjurusan = “”
txtsemester = “”
End Sub

7. Batal :
Private Sub cmdbatal_Click()
txtnpm.SetFocus
txtnpm = “”
txtnama = “”
txtps = “”
txtjurusan = “”
txtsemester = “”
End Sub

8. Keluar :
Private Sub cmdkeluar_Click()
end
End Sub

Gambar

1. Kode Buah :

Private Sub txtkb_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtnb.SetFocus

End If

End Sub

2. Nama Buah :

Private Sub txtnb_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txthb.SetFocus

End If

End Sub

3. Harga Buah :

Private Sub txthb_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtjb.SetFocus

End If

End Sub

4. Jumlah Beli :

Private Sub txtjb_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txttb.Text = Val(txthb.Text) * (txtjb.Text)

End If

End Sub

5. Total Bayar :

Private Sub txttb_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

End If

End Sub

 

6. Lagi :

Private Sub cmdlagi_Click()

txtkb.SetFocus

txtkb = “”

txtnb = “”

txthb = “”

txtjb = “”

txttb = “”

End Sub

 

7. Batal :

Private Sub cmdbatal_Click()

txtkb.SetFocus

txtkb = “”

txtnb = “”

txthb = “”

txtjb = “”

txttb = “”

End Sub

8. Keluar :

Private Sub cmdkeluar_Click()

End

End Sub