rodrigo_m_almeida
New Member
- Joined
- Jan 13, 2022
- Messages
- 42
- Office Version
-
- 2021
- Platform
-
- Windows
Good afternoon !
I'm using this code :
I need to save with the same name in xlsx this csv file for another folder...
I'm using this code :
VBA Code:
Public Sub TEST()
Application.ScreenUpdating = False
Dim xPathName As String, xFileName As String, xActiveWorkbookName As String
xPathName = "C:\ETC\CSV\"
xFileName = Dir(xPathName & "*.csv")
Do While Len(xFileName) > 0
Workbooks.Open FileName:=xPathName & xFileName, ReadOnly:=True, UpdateLinks:=False
xActiveWorkbookName = ActiveWorkbook.Name
ActiveWorkbook.SaveAs "C:\ETC\EXCEL\" & ActiveWorkbook.Name & ".xlsx"
Workbooks(xActiveWorkbookName).Close
xFileName = Dir()
Loop
Application.ScreenUpdating = True
End Sub
I need to save with the same name in xlsx this csv file for another folder...