Our selected item will store in the list index of combo box.
A) Property :
ComboBox : NAME- Combo1,TEXT-(Blank) Textbox : NAME-Text1,Text- (Blank) CommandButton-NAME- Command1,Caption-Add CommandButton-NAME- Command3,Caption-Select |
B) Attaching Code to the Object :
Private Sub Command1_Click() Combo1.AddItem Text1.Text End Sub Private Sub Command3_Click() st = Combo1.List(Combo1.ListIndex) MsgBox (st) End Sub |
=========================================================================
Back to Home & VB
No comments:
Post a Comment