• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Need Macro for converting Excel 2007 files to Excel 2003 format.

hsahoo84

New Member
I need a Macro for converting excel 2007 files to 2003 format and save as the same name and replace the existing one.


EX- Suppose a folder contains daily sales report of 100 branches and out of that 40 branches required report on Excel 2003 format.


Please help....

Thank u.
 
Hi hsahoo84


try the following code. It will open all xlsx files and save it as xls.

I keep the original (xlsx) files in the folder (so you have some kind of backup).

Hope it will help.


Best regards

slaya_cz


Sub open_save()


With Application.FileDialog(msoFileDialogFolderPicker)

.AllowMultiSelect = False

If .Show = False Then Exit Sub

sPath = .SelectedItems(1) & ""

End With


sname = Dir(sPath & "*.xlsx")


Do While Len(sname) > 1

Set bk = Workbooks.Open(sPath & sname)

ActiveWorkbook.SaveAs Filename:= _

sPath & Left(sname, Len(sname) - 4) & "xls", FileFormat:=xlExcel8, Password:="", WriteResPassword:="", _

ReadOnlyRecommended:=False, CreateBackup:=False

ActiveWindow.Close

sname = Dir

Loop


MsgBox ("Finished")


End Sub
 
Back
Top