What do I add to this code to export my worksheets with their worksheet name?
Currently it shoots them out as Sheet1, Sheet2, Sheet3 etc...
Thanks,
Currently it shoots them out as Sheet1, Sheet2, Sheet3 etc...
Code:
Sub ExpCsv()Dim i As Integer
For i = 1 To 3
Sheets(i).Activate
Range("A1:W645").Copy
Workbooks.Add
ActiveSheet.Paste
ActiveWorkbook.SaveAs Filename:="S:\Com\Monthly\Test\" & Sheets(i).Name & ".csv", FileFormat:=xlCSV, CreateBackup:=False
Application.DisplayAlerts = False
ActiveWorkbook.Close
Application.DisplayAlerts = True
Next
End Sub
Thanks,