combo box drop down list not visable

Posted on 2005-04-25
Last Modified: 2010-04-17
Writing a macro in excel vba. I added a combo box to a form. I can add items to the combo box however when the form is made visible the combo box is blank. I can type in the combo box and then one line appears. If I select the scroll arrow all the items added are shown in a list. If I click on the combo box the list also appears. What I want is the combo box to display the first 10 lines before anyhing is clicked. A book I have says the style should be set to 1 but Excel 2003 doesn't allow a 1 only 0 or two.
Any ideas
Question by:whiwex
    LVL 12

    Expert Comment

    Are you talking about a drop down combo box, or a list box?

    LVL 49

    Accepted Solution

    >> What I want is the combo box to display the first 10 lines before anyhing is clicked.

    This does not make sense. You want the first 10 lines displayed - a combo box can display only 1 item at a time in the box and as many items as required in the drop down list. You say when you click the down arrow the items are there - so what is the problem?

    If you want the box to display an item in the box from the start you have to select one

    combo.SelectItem ( -1, "Item Text")

    Don't know if that is what you were asking

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Suggested Solutions

    Purpose To explain how to place a textual stamp on a PDF document.  This is commonly referred to as an annotation, or possibly a watermark, but a watermark is generally different in that it is somewhat translucent.  Watermark’s may be text or graph…
    Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
    In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now