Do you need to export part of a spreadsheet (in this example, A3:A5) into an external, yet uncreated spreadsheet, saved as a special file type (.csv in the example)?
My pain is your gain.
Code
Sub testexport()
'
' export Macro
Range("A3:A5").Select
Selection.Copy
Workbooks.Add
ActiveSheet.Paste
ActiveWorkbook. SaveAs Filename:= _
"C:\Documents and Settings\Simon\My Documents\Book2.csv" _
, FileFormat:=xlCSV, CreateBackup:=False
Application.DisplayAlerts = False
ActiveWorkbook.Close
Application.DisplayAlerts = True
End Sub
Display More