-
Type Mismath
Can anyone tell me why this code is giving my a type mismatch error?
[vbcode]
Public Function qualitylook()
Dim n As Integer
Dim Qual As String
For n = 0 To lstFoundBrit.ListCount
Qual = lstFoundBrit.List(n)
lstFoundBrit.ListIndex = 0
If Left(Qual, 2) <> 1 Then
lstFoundBrit.RemoveItem (lstFoundBrit.List(lstFoundBrit.ListIndex))
End If
Next n
End Function
Thanx for the help,
Detard
-
Re: Type Mismath
If you are declaring this as a function, it must return a value. The code snippet you have provided should be called a Sub vice a function because it does not return a value.
-
Re: Type Mismath
>lstFoundBrit.RemoveItem (lstFoundBrit.List(lstFoundBrit.ListIndex))
Looks wrong to me:
removeItem takes an integer, .List returns a string.