PDA

View Full Version : Save as csv



Herbiec09
05-14-2013, 09:30 PM
Hi All,

I have the following code (part of it) which works fine on my Office 2010, but kicks out an error message on a colleague's machine who has Office 2007. Can anyone assist with a tweak for Excel 2007, i.e. how to save a worksheet as csv in 2007.



Workbooks("Journal Upload.xls").Worksheets("Sheet1").SaveAs Filename:="C:\Users\Tony\Journal Upload.csv", FileFormat:=xlCSVWindows
Also, after running this macro a number of times, my Excel seems to have slowed and keeps shutting down. I know there is some sort of a cache clean up procedure which could help, can anyone shed any light?

Thanks

H

snb
05-15-2013, 12:31 AM
What if you save the workbook instead of the worksheet ?

instead of


Workbooks("Journal Upload.xls").Worksheets("Sheet1").SaveAs



Workbooks("Journal Upload.xls").SaveAs