New CSV File

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top