|
-
January 27th, 2000, 01:58 PM
#1
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
-
January 27th, 2000, 08:36 PM
#2
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.
-
January 28th, 2000, 05:17 AM
#3
Re: Type Mismath
>lstFoundBrit.RemoveItem (lstFoundBrit.List(lstFoundBrit.ListIndex))
Looks wrong to me:
removeItem takes an integer, .List returns a string.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|