Nevermind, my mistake.
VB Code:
Private Function CheckmyList() Dim i As Integer Dim mystr As String Dim bFound As Boolean mystr = Text6 For i = 0 To List1.ListCount - 1 If InStr(UCase(List1.List(i)), UCase(mystr)) Then MsgBox "The command has been sent, " & mystr & "!" bFound = True Exit For End If Next If Not bFound Then MsgBox "Sorry, " & mystr & " but you do not have access!" End If End Function




Reply With Quote