Jul 20 2022 07:50 AM
i found this code
nomFichier = ActiveWorkbook.Path & "\" & "_" & ActiveSheet.name & Format(Now, "_yyyymmdd")
'ActiveSheet.Copy
'ActiveWorkbook.SaveAs nomFichier
Application.DisplayAlerts = False
wbNew.SaveAs nomFichier & ".csv", xlCSVUTF8 'new way
Application.DisplayAlerts = True
it almost does what i need (i mean it grabs my sheet and saves it into csv format
but for some reason it also renames my sheet in my current workbook and i do not want that :(
all i need it to do is to grab my sheet and save it to a new workbook in CSV format utf-8
thank you for any help
Jul 20 2022 08:22 AM
nomFichier = ActiveWorkbook.Path & "\" & "_" & ActiveSheet.Name & Format(Now, "_yyyymmdd")
ActiveSheet.Copy
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs nomFichier & ".csv", xlCSVUTF8
ActiveWorkbook.Close SaveChanges:=False
Application.DisplayAlerts = True
Jul 20 2022 08:46 AM
Jul 20 2022 09:02 AM
SolutionNo,
It copies the active sheet to a new workbook.This new workbook is now the active workbook.
This will be saved as a .csv file and then closed. You are left with the original, unchanged workbook.
Jul 20 2022 09:02 AM
SolutionNo,
It copies the active sheet to a new workbook.This new workbook is now the active workbook.
This will be saved as a .csv file and then closed. You are left with the original, unchanged workbook.