+ Reply to Thread
Results 1 to 6 of 6

New entry in a Combobox

  1. #1
    Registered User
    Join Date
    08-02-2007
    Posts
    30

    New entry in a Combobox

    Hi,

    I have created Userform where I can add or update members in our local gymnastics club.

    In the Userform I am using a Combobox (showing name, sirname and birth date) to show data of members in the club in to several text boxes. The combobox is "prefilled" with all members (sorted in alphabetic order).

    When I select one of the existing entries (member) in the combobox I display data linked to that member in several textboxes.

    If I want to add a new member, ie a new member (name) is typed in the combobox (not already in the list), I want all textboxes to be cleared and only show the new name in the textbox used for first name. I will then fill the other text boxes manually and later add the data in to the excel register.

    I do not seem to find the solution on how to clear the text boxes when a new name is entered in the combobox and I also do not know how to get the new name entered in the combobox in to the textbox "name".

    Could someone help?


    Thx


    Marcus

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    You need to add code to check if the name exists in the list, this depends on how you are populating the combobox. Are the xisting names stored in a sheet?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    08-02-2007
    Posts
    30

    Populating combobox by using sheets in a cell

    Hi RoyUK,

    thx for input.

    Yes I am populating the combobox with rows from a sheet (using 4 columns with headlines: membernumber, name, sirname, birthnumber).

    Could you help me with a simple "search name function"?


    Thx


    Marcus

    Quote Originally Posted by royUK
    You need to add code to check if the name exists in the list, this depends on how you are populating the combobox. Are the xisting names stored in a sheet?

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    What do you want to check against, there is a chance that First names and Surnames might be duplicated. Member number would be best.

  5. #5
    Registered User
    Join Date
    08-02-2007
    Posts
    30

    check against member number

    Good point!

    The member numbers would be unique and they are stored in cells A1:A1000

    Marcus

    Quote Originally Posted by royUK
    What do you want to check against, there is a chance that First names and Surnames might be duplicated. Member number would be best.

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    can you attach a zipped xample, I need to see exactly what your combobox contains.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1