Create Export CSV file From Worksheet


G

Guest

I would like to export my SAVES worksheet to a new spreadsheet. I would
like to copy only Cells A25 to ZT65536.

Path to new spreadsheet is: C:\Temp
File Name is: SAVES.csv

Please help with this tasks.

Thanks,
 
Ad

Advertisements

G

Guest

This seems pretty simple. You should be able to record a macro that selects
the data and then opens a new file, pastes the data and saves to your c drive.

The VBA behind it would look something like this:

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 11/21/2007 by Roger Converse
'
' Keyboard Shortcut: Ctrl+w
'
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Workbooks.Add
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveWorkbook.SaveAs Filename:= _
"C:\temp\saves.csv", FileFormat:= _
xlCSVMac, CreateBackup:=False
Range("A1").Select
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top