View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] redrosekrs@yahoo.com is offline
external usenet poster
 
Posts: 2
Default How to simply export a single sheet to a new .csv file?

Hi,

I'm sure my problem is not that difficult but it seems unique as my
searches haven't come up with anything similar. I have an excel file,
test1.xls and I want to take sheet2 specifically and export it into C:
and call the file that contains it test1.csv. In the module, I have
something like this:


Sub exportcsv()


Dim sheet2 As Worksheet



For sheet2 In ActiveWorkbook.Worksheets
sheet2.Copy
With ActiveSheet
.Parent.SaveAs Filename:="C:" & .test1, _
FileFormat:=xlCSV
.Parent.Close savechanges:=False
End With

Thanks for any suggestions...

End Sub