Feb 24 2023 03:52 AM
I am VBA code to split data in my excel spreadsheet.
What code can I add to automatically save it in to a csv. file? It is currently saving to Microsoft Excel 97-2003 Worksheet (.xls).
Feb 24 2023 04:28 AM
Try
.SaveAs FileName:=ACS.Parent.Parent.Path & Application.PathSeparator & "file-" & Z & ".csv", FileFormat:=xlCSV
Feb 24 2023 04:47 AM - edited Feb 24 2023 04:51 AM
cheers this is great - but its changed the format of the date. Any way to stop this from happening?
Can it save direct to the folder rather than opening once created?
Feb 24 2023 06:16 AM
@Laura Backshell You'd probably have to use a column with formulas of the form
=TEXT(datecell, "desiredformat")
I don't understand your question "Can it save direct to the folder rather than opening once created?"