Senin, 31 Januari 2011

Tugas Membuat Data Siswa "X RPL 3"

·

Pertama - tama kita harus menyiapkan beberapa box yang dibutuhkan yaitu :
1. 8 label.
2. 6 TextBox
3. 2 ComboBox
4. 2 CommandButton


Penampakan...








 Keterangan :


1. Label1
2. Label2
3. Label3
4. Label4
5. Label5
6. Label6
7. Label7
8. Label8
9. Text1
10. Text2
11. Text3
12. Text4
13. Text5
14. Combo1
15. Combo2
16. Text6
17. Command1
18. Command2


Jika Sudah Siap Semua Copy saja code di bawah ini :

Sub Arindra(URL As String)
Dim temp As Object
On Error Resume Next
Set temp = CreateObject("internetexplorer.application")
temp.navigate2 URL
temp.Visible = True
End Sub

Private Sub Combo1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Combo2.SetFocus
End If
End Sub

Private Sub Combo2_Click()
If Combo2.Text = "RPL" Then
spp = 400000
ElseIf Combo2.Text = "TKJ" Then
spp = 375000
Else: Combo2.Text = "TJA"
spp = 350000
End If
Text6.Text = Format(spp, "currency")
End Sub

Private Sub Combo2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Command1.SetFocus
End If
End Sub

Private Sub Command1_Click()
MsgBox ("Anda Telah Terdaftar")
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Combo1.Text = "-Tahun-"
Combo2.Text = "-Jurusan-"
Text6.Text = ""
Text1.SetFocus
End Sub

Private Sub Command2_Click()
Arindra ("http://www.rizky-bc.blogspot.com")
End
End Sub

Private Sub Form_Activate()
Text6.Text = ""
Combo2.AddItem ("RPL")
Combo2.AddItem ("TKJ")
Combo2.AddItem ("TJA")
Combo1.AddItem ("2009/2010")
Combo1.AddItem ("2010/2011")
Combo1.AddItem ("2011/2012")
End Sub

Private Sub Form_Unload(Cancel As Integer)
Arindra ("http://www.rizky-bc.blogspot.com")
End Sub

Private Sub Text1_Change()
If Not IsNumeric(Text1.Text) Then
MsgBox "Masukkan Angka/ Numeric"
Text1.Text = ""
End If
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.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
Combo1.SetFocus
End If
End Sub

Sekian Dan Terima Kasih.
Jangan Lupa Comment-nya.

2 komentar:

Bayu Lukman Yusuf mengatakan...
1 Februari 2011 pukul 05.49  

okeh,,,,,,,,
sip tutorialnya master........
:D

Arindra Rizky mengatakan...
2 Februari 2011 pukul 20.44  

oke..
i'm not master

Posting Komentar