ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   New CSV File (https://www.excelbanter.com/excel-programming/378373-new-csv-file.html)

Aaron

New CSV File
 
Hello,

Looking for code to.

Take Tab Name "Kitting Output" and turn it into a .CSV file named HLP with
todays date on the end. Example HPL112806.
And then save it to the desktop.

Thanks in Advance.
Aaron

Martin Fishlock

New CSV File
 
Aaron

Try this:

Sub csv()
On Error GoTo error_line
Sheets("Kitting Output").Copy

ActiveSheet.SaveAs _
Filename:="HLP" & Format(Now, "ddmmyy") & _
".csv", FileFormat:=xlCSV, CreateBackup:=False
ActiveWorkbook.Close savechanges:=False
Exit Sub
error_line:
MsgBox "Error saving file, check", vbOKOnly
End Sub

--
Hope this helps
Martin Fishlock


"Aaron" wrote:

Hello,

Looking for code to.

Take Tab Name "Kitting Output" and turn it into a .CSV file named HLP with
todays date on the end. Example HPL112806.
And then save it to the desktop.

Thanks in Advance.
Aaron



All times are GMT +1. The time now is 02:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com