how do i add items to a combobox from a listbox that is in another form??

Recommended Answers

All 2 Replies

how do i add items to a combobox from a listbox that is in another form??

You can reference the listbox directly using:

combobox.additem frmOtherfrm.listbox1.index(frmOtherfrm.listbox1.listindex)

This code will grab the currently selected item, and will cause an error if there is no selected item. You probably want to cycle through all the items, or search for a particle one based on criterea though.

Nice Job. If you are trying to get the item that is selected in the listbox, you could use list, instead of item, but nicely said.

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.