Ver Mensaje Individual
  #2 (permalink)  
Antiguo 03/12/2008, 03:40
Laufwerk
 
Fecha de Ingreso: marzo-2007
Mensajes: 538
Antigüedad: 17 años, 2 meses
Puntos: 0
Respuesta: VB6 - Buscar dentro de un array

de momento tengo hecho esto, pero me salta un error que dice "Calificador no valido"

Esta es mi función
Código:
Function NoEsta(numPet As String, arrayNumPet() As String) As Boolean
    Dim posiciones As Integer
    posiciones = arrayNumPet.Len
    
    For i = 0 To posiciones - 1
        If arrayNumPet(i) = numPet Then
            NoEsta = True
        Else
            NoEsta = False
        End If
    Next i
End Function
y la llamo asi
Código:
        Dim numPeticio() As String
        Dim comptadorArray As Integer
        comptadorArray = 0

            If NoEsta(rsPeticions.Fields("pbtnpet").Value, numPeticio()) Then
                ReDim numPeticio(comptadorArray)
                numPeticio(comptadorArray) = rsPeticions.Fields("pbtnpet").Value                ' Guardamos el numero de peticion en una variable
                comptadorArray = comptadorArray + 1
            Else
                rsPeticions.MoveNext
            End If
Gracias de nuevo