View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Omar[_7_] Omar[_7_] is offline
external usenet poster
 
Posts: 7
Default Export worksheet to .csv

I am trying to export multiple worksheets to .csv. This is what I have
so far:

For v = 1 To 7
Sheets(v).Select
ActiveWorkbook.SaveAs Filename:= _
"C:\" & .Name & ".csv", FileFormat:=xlCSV, _
CreateBackup:=False
Next v


When I run the code, I get an error "Method Save As of object
'_WorkBook' failed".

Any ideas on how to fix this?