Excel macro cells to CSV

February 18, 2009 at 12:19:14
Specs: Windows XP
Anyone know if it is possible to create a macro to save a range of cells in a worksheet to a CSV file.

See More: Excel macro cells to CSV

Report •

February 21, 2009 at 21:39:28
Something like this might work...

Sub SavetoCSV()

    Range("A1:E4").Copy Destination:=Sheets(3).Range("A1")

    ActiveWorkbook.SaveAs Filename:= _
        "C:\Documents and Settings\User1\My Documents\JustMyRange.csv", FileFormat:= _
        xlCSV, CreateBackup:=False
End Sub

Report •
Related Solutions

Ask Question