+ Reply to Thread
Results 1 to 3 of 3

Listbox with "other" option

  1. #1
    Registered User
    Join Date
    03-04-2005
    Posts
    12

    Listbox with "other" option

    Okay, so I have my listbox with several different vendor names in it, but I also want an option so that if a user chooses "other" or "not listed" then a popup comes up asking for the name of the new vendor, accepts that input and then puts it in the listbox. Any ideas???

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Baxter,

    Place this code in your ComboBox's After_Update event. This will add the vendor to list, but it is not permenant. You would need to store your vendor list on a worksheet or in a text file if you want to keep the changes to the list. If you have changed the name of the ComboBox from the default ComboBox1, be sure to make the change in the code also.
    _________________________________________________________________

    Private Sub ComboBox1_AfterUpdate()

    With ComboBox1
    If .List(.ListIndex) = "Other" Then
    NewVendor = InputBox("Enter Name of New Vendor Below.")
    If NewVendor <> "" Then .AddItem NewVendor
    .Text = NewVendor
    End If
    End With

    End Sub

    _________________________________________________________________

    Hope this helps,
    Leith Ross

  3. #3
    Registered User
    Join Date
    03-04-2005
    Posts
    12
    Thanks, Once again you have bailed me out. You word the answers in ways that I can definitely learn and grow upon too. Thanks again.

    Baxter

+ 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