i'm adding items to an excel listbox control, and want only to add those that are unique i.e not in the list already - probably a stupid question, but does anyone have any thoughts?
Sub AddUniqueItem(cbx as combobox,strItem as string)
dim i as integer
for i=0 to cbx.listcount-1
if ucase(strItem)=ucase(cbx.list(i)) then exit sub
next i
cbx.additem strItem
end sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.