Private Sub Command1_Click()
Dim item As String
item = InputBox("Enter the name of cars")
Combo1.AddItem (item)
Label1.Caption = "Number of cars:" & Combo1.ListCount
End Sub
Private Sub Command2_Click()
If Combo1.ListCount <> 0 And Combo1.ListIndex <> -1 Then
Combo1.RemoveItem (Combo1.ListIndex)
Label1.Caption = "Number of cars:" & Combo1.ListCount
Else
MsgBox "invalid"
End If
End Sub
Private Sub Command3_Click()
Combo1.Clear
Label1.Caption = "Number of cars:" & Combo1.ListCount
End Sub
Private Sub Command4_Click()
End
End Sub
Dim item As String
item = InputBox("Enter the name of cars")
Combo1.AddItem (item)
Label1.Caption = "Number of cars:" & Combo1.ListCount
End Sub
Private Sub Command2_Click()
If Combo1.ListCount <> 0 And Combo1.ListIndex <> -1 Then
Combo1.RemoveItem (Combo1.ListIndex)
Label1.Caption = "Number of cars:" & Combo1.ListCount
Else
MsgBox "invalid"
End If
End Sub
Private Sub Command3_Click()
Combo1.Clear
Label1.Caption = "Number of cars:" & Combo1.ListCount
End Sub
Private Sub Command4_Click()
End
End Sub
No comments:
Post a Comment