public sub copycombolist(fromctl as control, toctl as control, optional strmode as string)
on error resume next
dim intn as integer
screen.mousepointer = vbhourglass
if strmode <> "" then strmode = ucase(strmode) end if
with fromctl
if typename(fromctl) = "listbox" then for intn = .listcount - 1 to 0 step -1 if .0selected(intn) or instr(strmode, "all") then toctl.additem .list(intn) toctl.itemdata(toctl.newindex) = .itemdata(intn) if instr(strmode, "-") = 1 then .removeitem (intn) end if next else for intn = .listcount - 1 to 0 step -1 toctl.additem .list(intn) toctl.itemdata(toctl.newindex) = .itemdata(intn) if instr(strmode, "-") = 1 then .removeitem (intn) next end if end with