mine in your language

English French German Spain Italian Dutch Russian Portuguese Japanese Korean Arabic Chinese Simplified

Selasa, 03 Mei 2011

CONTOH PROGRAM SELECT CASE PADA VB 6

Open the program vb6.0
- Then create a new project just by clicking File, New Project, Select Standard, then OK
- Prepare a TextBox and 3 command button, then delete the text in the TextBox and change the name of a command button in accordance with the wishes in the Properties window
Then type the following script in a command button


Private Sub CmdNamaBulan_Click()
Dim sBulan As String
Select Case Val(Text1.Text)
Case 1
sBulan = "Januari"
Case 2
sBulan = "Februari"
Case 3
sBulan = "Maret"
Case 4
sBulan = "April"
Case 5
sBulan = "Mei"
Case 6
sBulan = "Juni"
Case 7
sBulan = "Juli"
Case 8
sBulan = "Agustus"
Case 9
sBulan = "September"
Case 10
sBulan = "Oktober"
Case 11
sBulan = "November"
Case 12
sBulan = "Desember"
End Select
MsgBox "Bulan " & sBulan, vbOKOnly, "Bulan"
End Sub
Private Sub CmdClear_Click()
Text1.Text = ""
Text1.SetFocus
End Sub
Private Sub CmdExit_Click()
Unload Me
End Sub
- Then run the program by way of the Run> Start or press F5

0 komentar:

Poskan Komentar

whos amoung

gambar

Loading...

people view me

u like my blog?

review http://makpanjicomunity.blogspot.com on alexa.com

now online

online counter

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | cheap international calls