以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  CheckedListBox至少选一项  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=169052)

--  作者:南望
--  发布时间:2021/5/31 16:36:00
--  CheckedListBox至少选一项
窗口有一个CheckedListBox控件,里面有很多数据项,如何遍历这个控件中的所有项,如果没有一项被选中则提示,这个代码怎么写?
--  作者:有点蓝
--  发布时间:2021/5/31 16:41:00
--  
参考:http://www.foxtable.com/webhelp/topics/0950.htm

Dim lst As WinForm.CheckedListBox
lst = Forms(
"窗口1").Controls("CheckedListBox1")
if lst.CheckedIndices.Count =0 then
msgbox("木有选中")
endif

--  作者:南望
--  发布时间:2021/5/31 17:40:00
--  
收到,谢谢