Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro to save Excel file as .CSV 1

Status
Not open for further replies.

maca9

Technical User
Apr 3, 2003
34
NZ
Hi

Is there a way I can have a macro save a file as CSV.

My problem is when I record a macro it then uses that filename i recorded the macro on as the name for ALL future files it converts.

I need the button to simply save the current file with the exact same name but just as .csv instead of .xls.

Thanks for any help

Scott

Diamond Specialists
 
A starting point:
With ActiveWorkbook
.SaveAs Filename:=Left(.FullName, Len(.FullName) - 3) & "csv", FileFormat:=xlCSV
End With

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top