is there a macro I can use that will save my current tab down to my desktop as a CSV file using the file name as the tab name?
Public Sub Save_Sheet_As_CSV()
Dim fileName As String
With ActiveSheet
fileName = CreateObject("WScript.Shell").SpecialFolders("Desktop") & Application.PathSeparator & .Name
.Copy
End With
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs fileName, FileFormat:=xlCSV
ActiveWorkbook.Close False
Application.DisplayAlerts = True
End Sub
I assume you mean use the tab name as the file name. Try this:
Code:Public Sub Save_Sheet_As_CSV() Dim fileName As String With ActiveSheet fileName = CreateObject("WScript.Shell").SpecialFolders("Desktop") & Application.PathSeparator & .Name .Copy End With Application.DisplayAlerts = False ActiveWorkbook.SaveAs fileName, FileFormat:=xlCSV ActiveWorkbook.Close False Application.DisplayAlerts = True End Sub