View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Nikos Yannacopoulos Nikos Yannacopoulos is offline
external usenet poster
 
Posts: 11
Default Saving Text Files in Excel

Eileen,

While you could indeed invoke the standard Windows File Save As dialog
through an API call, it is quite a piece of code (you can find it ready
on the net, but that doesn't make it any shorter...) to copy from file
to file. Also, if the just-change-the-file-type-and-extension approach
works for you, then why introduce unnecessary manual steps? Here's all
you need:

strFileName = ActiveWorkbook.FullName
strFileName = Left(strFileName, Len(strFileName) - 3) & "xls"
ActiveWorkbook.SaveAs Filename:=strFileName, FileFormat:=xlNormal

HTH,
Nikos