7,762
社区成员
发帖
与我相关
我的任务
分享
'---------------------------------------------------------------------------------------
' 过程名 : AddBySplit
' 时间 : 2010-3-23 17:51
' 作者 : 杨过.网狐.cn
' 功能 : http://topic.csdn.net/u/20100323/16/fa6bcfff-7de3-4eab-9475-19b3edc65bb4.html
' 说明 : 如何添加Combobox的选项
'---------------------------------------------------------------------------------------
'
Private Sub AddBySplit()
Dim i As Long, j As Long
Dim s As String, strFuhaos() As String
s = "+,-,*,/,mod"
strFuhaos = Split(s, ",")
For i = LBound(strFuhaos) To UBound(strFuhaos)
For j = 0 To Combo1.ListCount - 1
If Combo1.List(j) = strFuhaos(i) Then Exit For
Next
If j = Combo1.ListCount Then Combo1.AddItem strFuhaos(i)
Next
End Sub