Blog Post


Biyernes, Marso 6, 2015

Visual Basic 6.0 : Add Item to Combo Box

Sample Codes Here:

Private Sub cboCategory_Click()

If cboCategory = "C2AA" Then
List1.AddItem "12002207700"

ElseIf cboCategory = "C2SP" Then
List1.AddItem "12009908800"

Else

txtName.Text = ""
txtGender.Text = ""
List1.Clear
txtInput.SetFocus
cboCategory.Text = ""

End If
End Sub

Private Sub cmdADD_Click()
cboCategory.AddItem (txtInput.Text)
txtInput.SetFocus
txtInput.Text = ""
End Sub

Private Sub List1_Click()
If List1.Text = "12002207700" Then
txtName.Text = "FLORES"
txtGender.Text = "Male"
ElseIf List1.Text = "12009908800" Then
txtName.Text = "BADAT"
txtGender.Text = "Female"
End If
End Sub
Watch video below

0 (mga) komento:

Mag-post ng isang Komento