K
Ken
Hello, I have a macro that i recorded that is intended to export (save) data
from the active worksheet within a workbook to a CSV file. The problem i'm
having is that the macro is saving the entire workbook to a CSV. My file
name is even changing. Following is the code:
----------------------------------------------------------------
Sub SaveAsCSV()
'
' SaveAsCSV Macro
'
Application.DisplayAlerts = False
ActiveSheet.SaveAs Filename:= _
"Z:\Timesheet\Time Sheet 2009.csv" _
, FileFormat:=xlCSV, CreateBackup:=False
Application.DisplayAlerts = True
End Sub
---------------------------------------------------------------
The CSV that is being created is correct and accurate. However, my file
name changes from: Time Sheet 2009.xlsm to: Time Sheet.CSV. My intention is
to only convert the data in the Active Sheet and not the entire workbook.
I'm not sure if this is even possible.
Any ideas what might be wrong and how i can correct it?
Many thanks...
from the active worksheet within a workbook to a CSV file. The problem i'm
having is that the macro is saving the entire workbook to a CSV. My file
name is even changing. Following is the code:
----------------------------------------------------------------
Sub SaveAsCSV()
'
' SaveAsCSV Macro
'
Application.DisplayAlerts = False
ActiveSheet.SaveAs Filename:= _
"Z:\Timesheet\Time Sheet 2009.csv" _
, FileFormat:=xlCSV, CreateBackup:=False
Application.DisplayAlerts = True
End Sub
---------------------------------------------------------------
The CSV that is being created is correct and accurate. However, my file
name changes from: Time Sheet 2009.xlsm to: Time Sheet.CSV. My intention is
to only convert the data in the Active Sheet and not the entire workbook.
I'm not sure if this is even possible.
Any ideas what might be wrong and how i can correct it?
Many thanks...