CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Type Mismatch

  1. #1
    Join Date
    Jan 2000
    Posts
    6

    Type Mismatch

    Can someone tell me why I'm getting a type mismatch at this line? Thanx for help,
    Detard

    private Sub 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
    This line ----> lstFoundBrit.RemoveItem (lstFoundBrit.List(lstFoundBrit.ListIndex))
    End If
    next n
    End Sub





  2. #2
    Join Date
    Jan 2000
    Location
    MX
    Posts
    51

    Re: Type Mismatch

    >>lstFoundBrit.RemoveItem (lstFoundBrit.List(lstFoundBrit.ListIndex))

    remove item expects a numeric value, not an string, so, the correct line should be :

    lstFoundBrit.RemoveItem (lstFoundBrit.ListIndex)




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured