As DataMiser says, Dropdown combo's text can only be derived from the existing list by using the list index property.
Try this sub
Code:Sub UpdateMyCombo(cmb as combobox, mytext as string) dim i% for i = 0 to cmb.listcount -1 'If its in the list already use it If mytext = cmb.list(i) then cmb.listindex = i exit sub end if next i cmb.additem mytext 'If not add it cmb.listindex = cmb.listcount -1 end sub




Reply With Quote