PDA

View Full Version : Macro to export sheet as CSV



Howardc
07-25-2012, 07:15 AM
I have a sheet on a workbook called "Upload"

I would like to set up a macro to export this sheet as a CSV file to a directory called "temp" and to save the exported sheet as "Journal Upload". I have values in Col A:F and the maximum number of rows that will be used is 500

Your assistance in this regard will be most appreciated

Admin
07-25-2012, 07:59 AM
Hi

Try


Sub kTest()

Dim Sht As Worksheet

Set Sht = Worksheets("Upload")

Sht.Copy
ActiveWorkbook.SaveAs "C:\Temp\Journal Upload.CSV", 6
ActiveWorkbook.Close 0

End Sub

Howardc
07-25-2012, 08:59 PM
Thanks for the help, much appreciated