how to put category on combo box?...

Recommended Answers

All 6 Replies

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

Could you please elaborate your question?

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..

You need to use the .AddItem method to add items to the combo box.


Good Luck

You can use the following function to fill a combobox

Sub FillCombo()

    With Combo1
        .Clear
        .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)

johnly,

>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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.