Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding comboBox item in code

Status
Not open for further replies.

hirenJ

Programmer
Dec 17, 2001
72
0
0
GB

Hi all -- I have a combo Box that is based on a value list --i.e. its static -- how can I add another row to this comboBox at run-time in code?

NB: The comboBox contains two columns...

is this possible at runtime?


cheers

Hiren

:eek:)
 
Hi!

Just add the information using the rowsource like this:

Yourcombobox.RowSource = Yourcombobox.RowSource & ";" & FirstColumnInfo & ";" & SecondColumnInfo

hth
Jeff Bridgham
bridgham@purdue.edu
 
I believe you could also do cboCombo.AddItem (Parameters). This way you wouldnt have to resize columns and add the same things back into the list
 
Hi!

VBA doesn't support the AddItem method, that is only in VB. Otherwise I would agree 100%

Jeff Bridgham
bridgham@purdue.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top