View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
K[_2_] K[_2_] is offline
external usenet poster
 
Posts: 557
Default Convert from "xls" to "xlsm" format

On Sep 5, 3:22*pm, "Bernie Deitrick" <deitbe @ consumer dot org
wrote:
* *Add in the Kill after you've opened and saved the file:

If Right(WorkFile, 4) < "xlsm" Then
* * * Workbooks.Open FileName:=myPath & WorkFile
* * * ActiveWorkbook.SaveAs FileName:= _
* * * * * * myPath & WorkFile & "m", FileFormat:= _
* * * * * * xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
* * * ActiveWorkbook.Close
* * *Kill myPath & WorkFile
* End If

--
HTH,
Bernie
MS Excel MVP

"K" wrote in message

...



Thanks Bernie , your code works perfect just small question that how
can i kill or delete the old format files because i only want new
formated files in the folder- Hide quoted text -


- Show quoted text -


thats brilliant thanks lot. just last question sorry to be pain. how
can i convert them back to "xls" . just for knowledge