2
Hello guys I have this macro to convert several txt
for excel, but when it converts it does not separate the file by column ";"
Sub Convert_Csv()
Dim File_Names As Variant
Dim File_count As Integer
Dim Active_File_Name As String
Dim Counter As Integer
Dim File_Save_Name As Variant
File_Names = Application.GetOpenFilename(, , , , True)
File_count = UBound(File_Names)
Counter = 1
Do Until Counter > File_count
Active_File_Name = File_Names(Counter)
Workbooks.Open Filename:=Active_File_Name
Active_File_Name = ActiveWorkbook.Name
File_Save_Name = InStr(1, Active_File_Name, ".txt", 1) - 1
File_Save_Name = Mid(Active_File_Name, 1, File_Save_Name) & ".xlsx"
ActiveWorkbook.SaveAs Filename:=File_Save_Name, FileFormat:=xlOpenXMLWorkbooklocal:=true
ActiveWindow.Close
Counter = Counter + 1
Loop
End Sub
thank you very much friend I will test but immediately is grateful
– Marcio Ferreira
thanks for alerting me I’m new around here
– Marcio Ferreira
Thanks Marcio, good that it worked! Quiet, when in doubt consult the Help and make the Tour, it is well explained.
– Leo