Ver Mensaje Individual
  #2 (permalink)  
Antiguo 13/06/2009, 21:40
Avatar de juaco14
juaco14
 
Fecha de Ingreso: mayo-2009
Mensajes: 185
Antigüedad: 15 años
Puntos: 1
Respuesta: Ayuda código importar a LV

Resuelto!!
Para los que no saben como es, es ese mismo código pero sobra la linea

Código:
Public Sub Importar_ListView(ListView As ListView, PathArchivo As String)
Dim Linea As String, x As Integer, i As Integer, sStr() As String, it As Long

ListView1.ListItems.Add
Open PathArchivo For Input As #1
Line Input #1, Linea
sStr = Split(Linea, vbTab)
While Not EOF(1)
Line Input #1, Linea
sStr = Split(Linea, vbTab)
ListView1.ListItems.Add , , sStr(LBound(sStr))
it = it + 1
For i = LBound(sStr) To UBound(sStr) - 1
ListView1.ListItems(it).ListSubItems.Add , , sStr(i + 1)
Next
Wend
Close


End Sub
Private Sub Command5_Click()
Call Importar_ListView(ListView1, App.Path & "\datos-alumnos.txt")

 End Sub