Multi CheckList pada ListBox Visual Basic 6


Membuat Multi Check List pada ListBox Visual Basic 6.0

Buat listbox dengan name = list1

buat text dengan name  = text1

ketik kode seperti dibawah ini:

Private Sub Form_Load()
Dim MyList As ListItem

List1.AddItem “A”
List1.AddItem “B”
List1.AddItem “C”

End Sub

Private Sub List1_Click()
Proses
End Sub

Public Sub Proses()
Dim i, j As Integer
Text1.Text = “”
j = 0
For i = 0 To List1.ListCount – 1
If List1.Selected(i) Then
j = j + 1
If j = 1 Then
Text1.Text = Text1.Text & List1.List(i)
Else
Text1.Text = Text1.Text & vbCrLf & List1.List(i)
End If
End If
Next i
End Sub

 

Lalu Jalankan Program.

About these ads
About

Flexter member

Tagged with: , ,
Posted in Open source, Tutorial, VB 6.0
One comment on “Multi CheckList pada ListBox Visual Basic 6
  1. benben says:

    programnya memang sederhana tp sngat membantu ,,,

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

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: