9 Years
Discussion Span
Last Post by vb5prgrmr

Nothing is clear from your question . Please post your question clearly, properly specify what is the requirement and where you are struck.


sorry bout that sir..

What im saying is.. How to make a combo box ?

im tried to make one but when i run the prog te combo box is empty or nothing to show.. how to make combo box that has drop down list..

like this..

Attachments Image004.jpg 34.65 KB

You can use the following function to fill a combobox

Sub FillCombo()

    With Combo1
        .AddItem ("Item 1")
        .AddItem ("Item 2")
        .AddItem ("Item 3")
        .AddItem ("Item 4")
        .AddItem ("Item 5")
        .AddItem ("Item 6")
    End With

End Sub

You can call this function wherever you want to fill the combobox. For example call this in the Page_load event.

Pls Note by default a combo box (combination of textbox and listbox) has a dropdownlist and the textarea to type the text. This means the user can type something instead of selecting the items in the dropdownlist. If you want to prevent the user from typing something in the combobox and should be able to select something only from the dropdownlist then you need to set the Style property of the combobox to (2 - dropdownlist)



>For example call this in the Page_load event.

Ahh, that would be Form_Load in VB 6.0

and brieghz23, the style show in your graphic is a style of 1

Good Luck

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.