+ Reply to Thread
Results 1 to 6 of 6

How to improve this code to add drop down selection to input box

  1. #1
    Forum Contributor
    Join Date
    02-02-2013
    Location
    Jacksonville, Florida
    MS-Off Ver
    Excel 2010
    Posts
    167

    How to improve this code to add drop down selection to input box

    I would like to improve on the code below. What I would like to do is when the input box asks for "User Name" I would like to have a drop down selection with names to chose from. aka "Roco, Dan, Frank, etc". Any help on this would be greatly appreciated.


    Please Login or Register  to view this content.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: How to improve this code to add drop down selection to input box

    You have to use a combobox on a userform and call that userform instead of inputbox


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Contributor
    Join Date
    02-02-2013
    Location
    Jacksonville, Florida
    MS-Off Ver
    Excel 2010
    Posts
    167

    Re: How to improve this code to add drop down selection to input box

    Please Login or Register  to view this content.

  4. #4
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: How to improve this code to add drop down selection to input box

    You need to design a userform with a Combobox in it filled with the required names.
    You can add those names with the AddItem-method or use the List-method if the names are listed on a worksheet.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  5. #5
    Forum Contributor
    Join Date
    02-02-2013
    Location
    Jacksonville, Florida
    MS-Off Ver
    Excel 2010
    Posts
    167

    Re: How to improve this code to add drop down selection to input box

    Thank you for your reply.

    I just finished the design on the userform with a combobox. The list of names in the combobox are listed on "sheet2!A1:A8" which shows up in the box for selection. I'm having trouble getting the code written to open the userform and placing the name where it needs to go. Also my "OK" and "Cancel" buttons don't seem to be working. Please help.

  6. #6
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: How to improve this code to add drop down selection to input box

    If possible post example file and exact requirements where values are to be placed.
    To open the userform you can use the next code
    Please Login or Register  to view this content.
    which will popup the userform on activating the worksheet.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. CRM with unique text input per drop down selection
    By jnsmahn in forum Excel General
    Replies: 5
    Last Post: 03-02-2016, 12:14 PM
  2. [SOLVED] VBA Code based on Drop down selection
    By cslack1 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-28-2015, 06:56 AM
  3. Replies: 2
    Last Post: 08-07-2014, 06:33 AM
  4. Different input form for every drop down selection
    By gauravsep in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-26-2013, 07:29 AM
  5. Replies: 1
    Last Post: 06-03-2013, 06:30 AM
  6. [SOLVED] Formula to input time after selection from drop down boxes
    By stug in forum Excel General
    Replies: 9
    Last Post: 04-27-2012, 08:30 AM
  7. Replies: 2
    Last Post: 01-15-2012, 08:10 PM

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