Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub leerArchivoTexto()
- 'Leer archivos de texto separados por coma
- '
- Dim archivo As String 'ruta y nombre del archivo
- Dim texto As String 'lĂnea de texto a leer
- Dim i As Integer
- Dim n As Integer
- Dim renglon As Integer
- Dim columna As Integer
- Dim contador As Integer
- Dim texto2 As String
- contador = 0
- 'Abrir el archivo
- archivo = "C:UsersUsuarioDesktopPistolasconteo1Pistola7_mal.txt"
- Open archivo For Input As #1
- 'Leer y procesar el contenido del archivo
- While Not EOF(1)
- Line Input #1, texto
- texto2 = Trim(Mid(texto, 35, 6))
- If (texto2 <> "Conteo") Then
- contador = contador + 1
- End If
- Wend
- MsgBox (contador)
- Close #1
- End Sub
Add Comment
Please, Sign In to add comment