Computing.Net > Forums > Office Software > Excel macro cells to CSV

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Excel macro cells to CSV

Reply to Message Icon

Name: daniel.smith
Date: February 18, 2009 at 12:19:14 Pacific
OS: Windows XP
Subcategory: Microsoft Office
Comment:

Anyone know if it is possible to create a macro to save a range of cells in a worksheet to a CSV file.



Sponsored Link
Ads by Google

Response Number 1
Name: DerbyDad03
Date: February 21, 2009 at 21:39:28 Pacific
Reply:

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


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: Excel macro cells to CSV

Excel Macro read and process CSV www.computing.net/answers/office/excel-macro-read-and-process-csv/3820.html

Excel macro www.computing.net/answers/office/excel-macro/4051.html

Excel Macro Nightmare!!! www.computing.net/answers/office/excel-macro-nightmare/1081.html