View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Doug Glancy Doug Glancy is offline
external usenet poster
 
Posts: 770
Default A little help with SaveAs Method please

Stitch,

Using the macro recorder and then modifying, I got this. It assumes the
book your saving is the activeworkbook:

Sub Test()
ActiveWorkbook.SaveAs Filename:= _
Replace(LCase(ActiveWorkbook.Name), "csv", "xls"), FileFormat:=xlNormal
_
, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
End Sub

hth,

Doug

"Stitch45" wrote in message
...
I have a VBA macro that opens a selected CSV file and executes. What is
the code required to make the macro save the CSV file as an Excel Workbook,
with the same name and in the same location?

Appreciate the help

thanks