HURUF MUTU

KODE PROGRAM:HURUF MUTU

Private Sub Combo1_Click()

Dim nama, jurusan As String

 

Select Case Combo1.Text

Case “11100013”

nama = “ADE IRFAN SETIAWAN”

jurusan = “SISTEM INFORMASI”

 

Case “11100014”

nama = “SONI F”

jurusan = “SISTEM INFORMASI”

 

Case “11100156”

nama = ” ADITYA”

jurusan = “MANAJEMEN INFORMATIKA”

 

Case “10100157”

nama = “VANESSA”

jurusan = “MANAJEMEN INFORMATIKA”

 

End Select

Text1.Text = nama

Text2.Text = jurusan

Text3.SetFocus

End Sub

 

Private Sub Command1_Click()

Dim kuis, tugas, uts, uas, na As Integer

Dim hm As String

kuis = Val(Text3.Text)

tugas = Val(Text4.Text)

uts = Val(Text5.Text)

uas = Val(Text6.Text)

na = Val(kuis + 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()

Unload Me

End Sub

 

Private Sub Command3_Click()

Combo1.Text = “”

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

Text7.Text = “”

Text8.Text = “”

End Sub

 

Private Sub Form_Load()

Combo1.AddItem “11100013”

Combo1.AddItem “11100014”

Combo1.AddItem “11100156”

Combo1.AddItem “10100157”

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

 

 

 

KODE PROGRAM:

Private Sub Command1_Click()

Dim a, b, c, d As Double

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

Text1.SetFocus

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

End Sub

Private Sub Command6_Click()

Unload Me

End Sub

Private Sub Command7_Click()

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

End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text2.SetFocus

End If

End Sub

 

 

 

 

Posted on December 19, 2011, in Uncategorized. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: