hello
I have this code works well . it converts files are .XLS to XLSM ,but what I'm looking for it . it should delete all the files are .XLS after convering to XLSM .
Sub TrandformAllXLSFilesToXLSM()
Dim myPath As String
myPath = "C:\Users\alhagag\Desktop\MACROS\"
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
any suggestion to do that ,please?