![]() ![]() |
|
数据库(拷贝或移动列表框或组合框中的内容) | |
作者:佚名 文章来源:不详 点击数 更新时间:2008/4/18 14:44:43 文章录入:杜斌 责任编辑:杜斌 | |
|
|
参数 值 说明 fromctl 源列表框或组合框名 源列表框或组合框 toctl 目的列表框或组合框名 目的列表框或组合框 strmode 可选参数,默认情况下只拷贝 选中的项目 - 移动选中的项目 all 拷贝所有的项目,不需选中 -all 移动所有的项目,不需选中 源程序如下: 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 .selected(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 screen.mousepointer = vbdefault end sub |
|
![]() ![]() |