Hello
I am using a macro to open .txts in excel in seperate workbooks.
I am looking for a macro to save all open workbooks in .xls
I use the following macro from microsoft but it only saves them in their original form (.txt)
I am using a macro to open .txts in excel in seperate workbooks.
I am looking for a macro to save all open workbooks in .xls
I use the following macro from microsoft but it only saves them in their original form (.txt)
Code:
Sub SaveAll()
' Store the Activeworkbook in a variable.
Set aw = ActiveWorkbook
For Each wb In Workbooks
If wb.Path <> "" Then ' Save file if it has been saved
' previously
wb.Save
Else ' If not previously saved, activate and show the
' Save As dialog box.
wb.Activate
Application.Dialogs(xlDialogSaveAs).Show
End If
Next
aw.Activate ' Activate the original Activeworkbook.
End Sub
</pre>