View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Jim Rech Jim Rech is offline
external usenet poster
 
Posts: 2,718
Default How can I batch convert 97-2003 .xls files to 2007 .xlsx files

I would just add that if any of those workbooks had macros the files have to
get the XLSM extension or Excel will refuse to run them.

--
Jim
"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
| Dave,
|
| You could run a macro, below. Change the path to where you have the files
stored. With Excel 2007,
| you have a few options - I'm showing how to save files that may have
macros or other code...
|
| HTH,
| Bernie Deitrick
| MS Excel MVP
|
| Sub TrandformAllXLSFilesToXLSM()
|
| Dim myPath As String
|
| myPath = "C:\Excel\"
| WorkFile = Dir(myPath & "*.xls")
|
| Do While WorkFile < ""
| If Right(WorkFile, 4) < "xlsm" Then
| Workbooks.Open FileName:=myPath & WorkFile
| ActiveWorkbook.SaveAs FileName:= _
| myPath & WorkFile & "m", FileFormat:= _
| xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
| ActiveWorkbook.Close
| End If
| WorkFile = Dir()
| Loop
| End Sub
|
| "Dave Nuttall" wrote in message
| ...
| I have a lot to do, so it would be nice to batch them up!
|
|