SaveAs csv
hi,
yes it is. but you left out some critical info. Is the cvs file going to
always have the same name? here are 2 possible ways. change and don't change.
Sub mac1SaveRange()
Sheets("Sheet1").activate ' change this to your sheet name
Cells.Select
Selection.Copy
Workbooks.Add
Range("A1").Select
ActiveSheet.Paste
Range("A1").Select
Application.CutCopyMode = False
'use this code if the name DOES NOT change
'ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\My Documents\XCEL\deleteme.csv", _
FileFormat:=xlCSV, CreateBackup:=False
'change deleteme to your file name.
'use this code if the name DOES change
'Application.Dialogs(xlDialogSaveAs).Show
end sub
Post back if you have problems. I will be going to work soon and probably
wont be back to news groups until tonight. But I'll check to see.
Regards
FSt1
"Gert" wrote:
Hi,
I have to save one specific sheet (or a copy of this sheet) as a scv
file but at the same time I want to keep the original workbook a xls
file.
Is it possible to do this with a macro ???
thanks in advance
Gert
|