Office中国论坛/Access中国论坛

标题: 是否在SelectBox里 [打印本页]

作者: ywfqd    时间: 2006-8-17 23:40
标题: 是否在SelectBox里
Public Function InSelectBox(mlistbox As listbox, strFind As String) As Boolean
On Error GoTo Err_InSelectBox

InSelectBox = False
For i = 0 To mlistbox.ListCount - 1
  If UCase(mlistbox.ItemData(i)) = UCase(strFind) Then
    InSelectBox = True
    Exit For
  End If
Next i

Exit_InSelectBox:
  Exit Function
Err_InSelectBox:
  MsgBox Err.Description
  GoTo Exit_InSelectBox
End Function
作者: fan0217    时间: 2006-8-18 01:07
看了你几贴,都是没头没尾,能否作点必要的说明啊!




欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/) Powered by Discuz! X3.3