+ Reply to Thread
Results 1 to 10 of 10

items in drop down lists in excel combo box not showing

  1. #1
    Registered User
    Join Date
    04-10-2013
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2003
    Posts
    39

    items in drop down lists in excel combo box not showing

    Hi,
    I've created an excel user form for inserting simple entries into a database. Amongst simple text/data entry, the form incorporates a combo box with a drop down menu of items to select.

    The combo box has been created using the following VBA code (as came from the 'Contextures' website):

    Please Login or Register  to view this content.
    The worksheet where the drop down list is stored is named 'Drop_down_lists'. The range name to incoporate the drop-down menu selections is called "Expense_type" and is defined as the following formula :

    =OFFSET(Drop_down_lists!$A$2,0,COUNTA(Drop_down_lists!$A:$A)-1,1)

    I've tried putting the range name of 'Expense_type' into the Row source box in the Properties of the Combox in VBA (name CBOexpense), but still when I run the Macro to display the user form, the drop down box remains blank.

    Have I named everything correctly and referred to ranges correctly in the program? I am using Excel 2003.
    Last edited by Fotis1991; 01-03-2014 at 02:07 PM.

  2. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: items in drop down lists in excel combo box not showing

    If the cells are populated with a formula you might try to change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    On a side note, please use code tags when posting code. To use code tags highlight your code and press the # in the toolbar.
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  3. #3
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: items in drop down lists in excel combo box not showing

    Hello
    I don't know a great deal of VBA but I usually use something like:

    Please Login or Register  to view this content.
    does this help?

    DBY

  4. #4
    Registered User
    Join Date
    04-10-2013
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2003
    Posts
    39

    Re: items in drop down lists in excel combo box not showing

    Thanks DBY, I tried your suggestion.
    I replaced Combobox1 in the code with the name of the combobox - cboexpense.
    However when I come to this box in the form, I click on the arrow and a blank row appears below. I then click on this blank row and then I can enter the text manually. The drop down list still isn't appearing - must be something wrong with the named ranges?
    Jonno1

  5. #5
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: items in drop down lists in excel combo box not showing

    Can you attach your workbook as an example?

  6. #6
    Registered User
    Join Date
    04-10-2013
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2003
    Posts
    39

    Re: items in drop down lists in excel combo box not showing

    File enclosed
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    04-10-2013
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2003
    Posts
    39

    Re: items in drop down lists in excel combo box not showing

    I've highlighted the Code and pressed the #1 button at the top right hand side of the message - is this the control panel?
    Regards,
    Jonno1

  8. #8
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: items in drop down lists in excel combo box not showing

    To edit your first post:

    Click 'Edit Post' below your first post. Highlight the code and press the # in the toolbar. Then click 'Save'.

  9. #9
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: items in drop down lists in excel combo box not showing

    try:
    Please Login or Register  to view this content.
    This is untested. There was an 'Permission Denied' error when I tried to open your userform.

  10. #10
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: items in drop down lists in excel combo box not showing

    Hello
    Your named range 'Expense_type' was referencing an empty cell, the formula was incorrect. I've corrected it and the code I suggested seems to work fine for that particular combo box. See attached.

    DBY
    Attached Files Attached Files

+ 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. Dependent Drop Down Lists, or VBA Combo Box?
    By mjninc in forum Excel - New Users/Basics
    Replies: 11
    Last Post: 03-12-2013, 03:29 PM
  2. Drop down menu lists items from a table
    By Nate5452 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-21-2007, 06:47 PM
  3. showing drop down list when combo box is activated
    By dhavanchopra in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-26-2007, 07:49 AM
  4. Hide previously used items from multiple drop lists
    By ron in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-25-2006, 02:55 PM
  5. Hide previously used items from multiple drop lists
    By ron in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-27-2006, 05:20 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