Results 1 to 3 of 3

Thread: how to add items in combo box

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2011
    Posts
    30

    how to add items in combo box

    Dear Sir,
    I have created an combo box and added some items if i want to add an other items so how to add these items using textbox kindly do need full

    Regards
    Satish.S

  2. #2
    Lively Member S0LARIS's Avatar
    Join Date
    Apr 2011
    Posts
    121

    Re: how to add items in combo box

    Hi,this way:
    vb Code:
    1. Private Sub Command1_Click()
    2. Combo1.AddItem Text1.Text
    3. End Sub
    If my post was helpful to you, then express your gratitude using Rate this Post.
    To understand recursion, you must first understand recursion.

  3. #3
    PowerPoster CDRIVE's Avatar
    Join Date
    Jul 2007
    Posts
    2,620

    Re: how to add items in combo box

    You can do it in the KeyDown event too.
    Code:
    Option Explicit
    
    Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
       If KeyCode = (13) Then        ' if Enter key is pressed.
          Combo1.AddItem Text1.Text
       End If
    End Sub
    <--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
    If topic has been resolved, please pull down the Thread Tools & mark it Resolved.


    Is VB consuming your life, and is that a bad thing??

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width