'Pasar datos de excel a TXT
Sub Consulta01()
Dim NombreArchivo, rutaArchivo As String
NombreArchivo = Range("A1")
rutaArchivo = ActiveWorkbook.Path & "\" & NombreArchivo & ".txt"
Open (rutaArchivo) For Output As 1
Print #1, ActiveSheet.Range("A2").Value
Print #1, ActiveSheet.Range("A3").Value
Print #1, ActiveSheet.Range("A4").Value
Print #1, ActiveSheet.Range("A5").Value
Close #1
Range("A1").Select
MsgBox "Archivo >>>" & NombreArchivo & "<<< Generado con Exito", , "ExcelConsultor"
End Sub
Comentarios sobre la versión: 1 (0)
No hay comentarios