I work with a lot of training material, and often need to convert old files into the newer file formats for Office 2007. I created this macro (below) to convert *.xls files into *.xlsm files, and it works great, but I have two questions to ask to improve the macro.
Code: Select all
Sub ConvertFromXL2003()
Dim myFile As String
ChDir "D:\Test\EDA"
myFile = Dir("*.xls")
Application.ScreenUpdating = False
Do Until myFile = ""
Workbooks.Open myFile
ActiveWorkbook.SaveAs _
Filename:="D:\Test\EDA2007\" & myFile & "m", _
FileFormat:=xlOpenXMLWorkbookMacroEnabled, _
CreateBackup:=False
Workbooks(myFile & "m").Close SaveChanges:=False
myFile = Dir
Loop
Application.ScreenUpdating = True
End Sub
2. I would like some progress indicator to inform of the progress, but since I cannot determine how many files are in the folder when I use the DIR function, I cannot calculate the duration to display on the status bar. Any ideas for how to show some form of progress as to the time duration the procedure will still take?
TIA for any brilliant ideas or comments.