dhinarkusumawatistmikpringsewu

Just another WordPress.com site

tugas vb 5

Private Sub cbokode_Click()

Dim kode, merk, hs As String

Select Case cbokode.Text

Case “Asus A43SA”

txtmerk.Text = “Asus A43SA-VX090D”

txths.Text = “5500000”

Case “Asus A43SD”

txtmerk.Text = “Asus A43SD-VX052D”

txths.Text = “4500000”

Case “Asus A43SJ”

txtmerk.Text = “Asus A43SJ-VX792D”

txths.Text = “4300000”

Case “Asus A43TA”

txtmerk.Text = “Asus A43TA-VX034D”

txths.Text = “4900000”

Case “Asus N43SJ”

txtmerk.Text = “Asus N43SJ-VX264D”

txths.Text = “4300000”

Case “Asus U36SD”

txtmerk.Text = “Asus U36SD-VX090D”

txths.Text = “6600000”

Case “Apple MC965”

txtmerk.Text = “Apple Macbook Air MC965”

txths.Text = “12800000”

Case “Apple MC966”

txtmerk.Text = “Apple Macbook Air MC966”

txths.Text = “15800000”

Case “Apple MC969”

txtmerk.Text = “Apple Macbook Pro MC969”

txths.Text = “11900000”

Case “Apple MC700”

txtmerk.Text = “Apple Macbook Pro MC700”

txths.Text = “10800000”

Case “Apple MC723”

txtmerk.Text = “Apple Macbook Pro MC723”

txths.Text = “19300000”

Case “Apple MD311”

txtmerk.Text = “Apple Macbook Pro MD311”

txths.Text = “24200000”

Case “Apple MD313”

txtmerk.Text = “Apple Macbook Pro MD313”

txths.Text = “11900000”

Case “Apple MD314”

txtmerk.Text = “Apple Macbook Pro MD314”

txths.Text = “14700000”

Case “Apple MD322”

txtmerk.Text = “Apple Macbook Pro MD322”

txths.Text = “21300000”

End Select

txtjj.SetFocus

End Sub

 

Private Sub cmdhitunglagi_Click()

cbokode.Text = “”

txtmerk.Text = “”

txths.Text = “”

txtjj.Text = “”

txthp.Text = “”

txtdis.Text = “”

txttb.Text = “”

txtterbilang.Text = “”

 

End Sub

 

Private Sub cmdkeluar_Click()

End

End Sub

 

Private Sub cmdproses_Click()

Dim hp As String

txthp.Text = Val(txths.Text) * Val(txtjj.Text)

If txthp.Text > 140000000 Then

txtdis.Text = Val(txthp.Text) * 0.15

ElseIf txthp.Text > 135000000 Then

txtdis.Text = Val(txthp.Text) * 0.1

ElseIf txthp.Text > 130000000 Then

txtdis.Text = Val(txthp.Text) * 0.05

ElseIf txthp.Text > 125000000 Then

txtdis.Text = Val(txthp.Text) * 0.02

End If

Dim tb As String

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

End Sub

 

Private Sub Form_Load()

cbokode.AddItem “Asus A43SA”

cbokode.AddItem “Asus A43SD”

cbokode.AddItem “Asus A43SJ”

cbokode.AddItem “Asus A43TA”

cbokode.AddItem “Asus N43SL”

cbokode.AddItem “Asus U36SD”

cbokode.AddItem “Apple MC965”

cbokode.AddItem “Apple MC966”

cbokode.AddItem “Apple MC969”

cbokode.AddItem “Apple MC700”

cbokode.AddItem “Apple MC723”

cbokode.AddItem “Apple MD311”

cbokode.AddItem “Apple MD313”

cbokode.AddItem “Apple MD314”

cbokode.AddItem “Apple MD322”

 

End Sub

 

 

Private Sub txttb_Change()

txtterbilang.Text = terbilang(Val(txttb.Text))

End Sub

Private Function baca(X As Integer) As String

Dim i As Long

Dim ratus(9) As String

Dim belas(9) As String

Dim puluh(9) As String

Dim satuan(9) As String

Dim sbaca As String

satuan(1) = “satu”

satuan(2) = “dua”

satuan(3) = “tiga”

satuan(4) = “empat”

satuan(5) = “lima”

satuan(6) = “enam”

satuan(7) = “tujuh”

satuan(8) = “delapan”

satuan(9) = “sembilan”

For i = 1 To 9

If i = 1 Then

puluh(i) = “sepuluh”

Else

puluh(i) = satuan(i) & ” puluh”

End If

Next

For i = 1 To 9

If i = 1 Then

belas(i) = “sebelas”

Else

belas(i) = satuan(i) & ” belas”

End If

Next

For i = 1 To 9

If i = 1 Then

ratus(i) = “seratus”

Else

ratus(i) = satuan(i) & ” ratus”

End If

Next

If X >= 100 Then

sbaca = ratus(Val(Mid(Str(X), 2, 1)))

X = Val(Mid(Str(X), 3, 2))

End If

If X >= 20 Or X = 10 Then

sbaca = sbaca & ” ” & puluh(Val(Mid(Str(X), 2, 1)))

X = Val(Mid(Str(X), 3, 1))

Else

If X > 10 Then

sbaca = sbaca & ” ” & belas(Val(Mid(Str(X), 3, 1)))

X = -1

End If

End If

If X >= 1 Then

sbaca = sbaca & ” ” & satuan(Val((Str(X))))

End If

baca = sbaca

End Function

Function terbilang(X As Currency) As String

Dim ribu, juta, milyar, trilyun, ratusan As Integer

Dim sterbilang As String

Dim ptext As Byte

sterbilang = “”

If Val(X) = 1000000000000# Then

ptext = Len(Str(X)) – 13

trilyun = Val(Mid(Str(X), 2, ptext))

sterbilang = sterbilang & ” ” & baca(Val(trilyun)) & ” trilyun”

X = Val(Mid(Str(X), ptext + 2, 12))

End If

If X >= 1000000000 Then

ptext = Len(Str(X)) – 10

milyar = Val(Mid(Str(X), 2, ptext))

sterbilang = sterbilang & ” ” & baca(Val(milyar)) & ” milyar”

X = Val(Mid(Str(X), ptext + 2, 9))

End If

If X >= 1000000 Then

ptext = Len(Str(X)) – 7

juta = Val(Mid(Str(X), 2, ptext))

sterbilang = sterbilang & ” ” & baca(Val(juta)) & ” juta”

X = Val(Mid(Str(X), ptext + 2, 6))

End If

If X >= 1000 Then

ptext = Len(Str(X)) – 4

ribu = Val(Mid(Str(X), 2, ptext))

If ribu = 1 Then

sterbilang = “seribu”

Else

sterbilang = sterbilang & ” ” & baca(Val(ribu)) & ” ribu”

End If

X = Val(Mid(Str(X), ptext + 2, 3))

End If

sterbilang = sterbilang & ” ” & baca(Val(X))

terbilang = Trim(sterbilang) & ” rupiah”

End Function

Iklan
Tinggalkan komentar »

Tugas VB baru

Private Sub Command1_Click()
Dim K, S As String
Dim C As Long
K = Left(Text2.Text, 1)
If K = “E” Or K = “e” Then
Text3.Text = “EKSEKUTIF”
S = Mid(Text2.Text, 6, 2)
If S = “01” Then
text5.Text = “STRATA SATU”
text8.Text = “200000”
text9.Text = “1900000”
text10.Text = “1250000”
text11.Text = “600000”
ElseIf S = “02” Then
text5.Text = “DIPLOMA TIGA”
text8.Text = “150000”
text9.Text = “1650000”
text10.Text = “1250000”
text11.Text = “600000”
ElseIf S = “03” Then
text5.Text = “DIPLOMA SATU”
text8.Text = “150000”
text9.Text = “1350000”
text10.Text = “1250000”
text11.Text = “600000”
End If
End If
C = Val(text8.Text) + Val(text9.Text) + Val(text10.Text) + Val(text11.Text)
text12.Text = C
If K = “R” Or K = “r” Then
Text3.Text = “REGULER”
S = Mid(Text2.Text, 6, 2)
If S = “01” Then
text5.Text = “STRATA SATU”
text8.Text = “200000”
text9.Text = “1500000”
text10.Text = “1000000”
text11.Text = “600000”
ElseIf S = “02” Then
text5.Text = “DIPLOMA TIGA”
text8.Text = “150000”
text9.Text = “1250000”
text10.Text = “1000000”
text11.Text = “600000”
ElseIf S = “03” Then
text5.Text = “DIPLOMA SATU”
text8.Text = “150000”
text9.Text = “1250000”
text10.Text = “1000000”
text11.Text = “600000”
End If
End If
C = Val(text8.Text) + Val(text9.Text) + Val(text10.Text) + Val(text11.Text)
text12.Text = C
text6.Text = “20” & Mid(Text2.Text, 3, 2)
S = Mid(Text2.Text, 5, 1)
If S = “1” Then
Text4.Text = “SISTEM INFORMASI”
ElseIf S = “2” Then
Text4.Text = “MANAJEMEN INFORMATIKA”
ElseIf S = “3” Then
Text4.Text = “MANAJEMEN & KOM.AKUTYANSI”
End If
text7.Text = Right(Text2.Text, 3)

text8.Text = FormatNumber(text8, 2)
text9.Text = FormatNumber(text9, 2)
text10.Text = FormatNumber(text10, 2)
text11.Text = FormatNumber(text11, 2)
text12.Text = FormatNumber(text12, 2)
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Command3_Click()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text4.Text = “”
text5.Text = “”
text6.Text = “”
text7.Text = “”
text8.Text = “”
text9.Text = “”
text10.Text = “”
text11.Text = “”
text12.Text = “”
End Sub

Private Sub Command4_Click()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text4.Text = “”
text5.Text = “”
text6.Text = “”
text7.Text = “”
text8.Text = “”
text9.Text = “”
text10.Text = “”
text11.Text = “”
text12.Text = “”
End Sub

Private Sub Form_Activate()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text4.Text = “”
text5.Text = “”
text6.Text = “”
text7.Text = “”
text8.Text = “”
text9.Text = “”
text10.Text = “”
text11.Text = “”
text12.Text = “”
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub

KODE PROGRAM :

Private Sub Form_Activate()

Dim c As Integer

c = 1

Do While c < 20

c = c + 2

List1.AddItem c

Loop

End Sub

KODE PROGRAM

Private Sub Form_Activate()

Dim A As Integer

A = 0

Do While A< 20

A = A + 2

List1.AddItem A

Loop

End Sub

KODE PROGRAM

Private Sub Form_Activate()

Dim B As Integer

For B = 5 To 499 Step 27

List1.AddItem B + 3

Next B

End Sub

Tinggalkan komentar »

» Waspada, Patah Hati Sebabkan Gangguan Fisik

PATAH hati tidak hanya menyakitkan buat perasaan, tapi juga dapat berpengaruh pada kesehatan fisik. Seperti apa gangguan konkritnya?

Cinta tak berbalas ternyata dapat mengakibatkan efek besar pada fisik seseorang. Para ahli saraf dari Columbia University (AS) menemukan, bahwa cinta tak berbalas memang menyakitkan dalam arti harfiah sekaligus secara fisiologis seperti dilansir Genius Beauty.

Penelitian menunjukkan ketika seseorang sedang mengalami break-up dengan pasangan tercinta, kenangan akan orang tersebut bahkan ketika melirik fotonya akan mengaktifkan wilayah yang sama di otak seperti pada saat kita mengalami sakit fisik parah.

Selain itu, efeknya tidak hanya berlaku untuk pasangan, tetapi juga untuk semua orang-orang terdekat yang menolak kita seperti orangtua, teman, dan anggota keluarga. Untuk meredakan rasa sakit, para peneliti merekomendasikan latihan pernapasan dan psikoterapi, serta bersosialisasi dengan teman, dan keluarga.

Terakhir, para ilmuwan pun menyarankan untuk mengobati seseorang yang mengalami cinta tidak bahagia atau kehilangan seorang teman yang perhatian dan serius, bahkan jika ia sakit parah atau terluka sekalipun. (ind)
(tty)

http://lifestyle.okezone.com/read/2012/02/17/197/577853/waspada-patah-hati-sebabkan-gangguan-fisik

Tinggalkan komentar »

Hello world!

Welcome to WordPress.com. After you read this, you should delete and write your own post, with a new title above. Or hit Add New on the left (of the admin dashboard) to start a fresh post.

Here are some suggestions for your first post.

  1. You can find new ideas for what to blog about by reading the Daily Post.
  2. Add PressThis to your browser. It creates a new blog post for you about any interesting  page you read on the web.
  3. Make some changes to this page, and then hit preview on the right. You can always preview any post or edit it before you share it to the world.
1 Komentar »