Hola!

Registrándote como bakuno podrás publicar, compartir y comunicarte en privado con otros bakuos :D

Regístrame ya!

Ayuda programacion Excel-Visual

deimozx

Bovino maduro
Desde
13 Dic 2008
Mensajes
121
Me podrian ayudar para generar una macro para copiar el contenido de un txt en una columna de excel ?
 
Sub leer_fichero_de_texto()
On Error Resume Next
Application.ScreenUpdating = False
fichero_de_texto = "mifichero.txt"
Set fso = CreateObject("Scripting.FileSystemObject")
ruta = ActiveWorkbook.Path
Set archivo = fso.OpenTextFile(ruta & "\" & fichero_de_texto, 1)
contenido = archivo.readall
archivo.Close
Set fso = Nothing
Set archivo = Nothing
contenido = Split(contenido, vbCrLf)
Range("A1").Select
For i = 0 To UBound(contenido)
ActiveCell = contenido(i)
ActiveCell.Offset(1, 0).Select
Next
Application.ScreenUpdating = True
End Sub
 
Volver
Arriba