Ver Mensaje Individual
  #3 (permalink)  
Antiguo 07/05/2006, 22:00
Avatar de marcos1979
marcos1979
 
Fecha de Ingreso: abril-2004
Ubicación: 62º 06' 18" O / 33º 07' 47" S
Mensajes: 331
Antigüedad: 20 años, 1 mes
Puntos: 1
No se, se me ocurre, puede que haya otras formas mas fáciles:

Código:
    Dim elemento() As String
    Dim i As Long
    Dim e As Long
    Dim YaEsta As Boolean
    Dim ElementosSinRepetir As Long
    
    ReDim elemento(0)
    
    elemento(UBound(elemento)) = List1.List(i)
    
    For i = 1 To List1.ListCount - 1
        
        YaEsta = False
    
        For e = 0 To UBound(elemento)
        
            If elemento(e) = List1.List(i) Then
            
                YaEsta = True
                Exit For
                
            End If
            
        Next
        
        If YaEsta = False Then
        
            ReDim Preserve elemento(UBound(elemento) + 1)
            elemento(UBound(elemento)) = List1.List(i)
        
        End If
            
    Next
    
    ElementosSinRepetir = UBound(elemento) + 1
    
    MsgBox ElementosSinRepetir
Espero que no sea tarde y que te sirva
Un saludo
__________________
Marcos

El dinero no da la felicidad... démelo y sea feliz!!!