View Single Post
  #2   Report Post  
Ron de Bruin
 
Posts: n/a
Default

Try this one to save the file in C:\

Sub Sheet_CSV_File()
Dim wb As Workbook
Dim strdate As String
Dim Fname As String

strdate = Format(Now, "dd-mm-yy h-mm-ss")

Fname = "C:\Part of " & ThisWorkbook.Name _
& " " & strdate & ".csv"

Application.ScreenUpdating = False
Sheets("CSV Data").Copy
Set wb = ActiveWorkbook
With wb
.SaveAs Fname, FileFormat:=xlCSV
.Close False
End With
Application.ScreenUpdating = True
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Husker87" wrote in message ...
I have a workbook with several worksheets. I want to record a macro that
will save one tab, "CSV Data" as its own csv file to another location. Any
ideas?