Saving Excel file as .xls in Excel 2007

Donal28

Well-known Member
Joined
Apr 23, 2010
Messages
527
Hi All

I'm looking to save an excel file as a .xls file in Excel 2007. I have the following line of code in the macro which will save the file as a .xlsx file(because its beeen opened in Excel 2007) but as the macro opens and closes numerous files it produces never ending imcompatability errors when saving. Can the code below be amended to save as a .xls file

wkbTarget.Close savechanges:=True

any help on this would be very much appreciated

Regards
Donal
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Take a look at this, I simply recorded a macro to use the current workbook to Save as 97 - 2003 format (I recorded and then pressed F12 which is Save as). you should note the version details

Sub Macro1()
'
' Macro1 Macro
'

'
ActiveWorkbook.SaveAs Filename:= _
"C:\Users\Trevor G\Documents\newtest.xls", FileFormat:=xlExcel8, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
End Sub
 
Upvote 0
Take a look at this, I simply recorded a macro to use the current workbook to Save as 97 - 2003 format (I recorded and then pressed F12 which is Save as). you should note the version details


Thanks for your help Trevor, I too am a Blues supporter!! Hughton would be a good appointment
 
Upvote 0
Pleased to read you have a solution that you can work with.

Yes Donal I agree I think Chris will be a good appointment for the Blues but the board must work with him!
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,758
Members
452,940
Latest member
rootytrip

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top